поискавой системы для электроныых деталей |
|
HT46R004 датащи(PDF) 44 Page - Holtek Semiconductor Inc |
|
HT46R004 датащи(HTML) 44 Page - Holtek Semiconductor Inc |
44 / 84 page Rev. 1.30 44 �an�a�� ��� �01� Rev. 1.30 45 �an�a�� ��� �01� HT46R004 Cost-Effective A/D 8-Bit OTP MCU I/O Interfacing TheTimer/EventCounter,whenconfiguredtorunintheeventcounterorpulsewidthcapture mode,requirestheuseofanexternaltimerpinforitsoperation.Asthispinisasharedpinitmust beconfiguredcorrectlytoensurethatitissetforuseasaTimer/EventCounterinputpin.Thisis achievedbyensuringthatthemodeselectsbitsintheTimer/EventCountercontrolregister,either theeventcounterorpulsewidthcapturemode.AdditionallythecorrespondingPortControlRegister bitmustbesethightoensurethatthepinissetasaninput.Anypull-highresistorconnectedtothis pinwillremainvalidevenifthepinisusedasaTimer/EventCounterinput. Programming Considerations Whenrunninginthetimermode,theinternalsystemclockisusedasthetimerclocksourceand isthereforesynchronisedwiththeoveralloperationofthemicrocontroller.Inthismodewhen theappropriatetimerregisterisfull,themicrocontrollerwillgenerateaninternalinterruptsignal directingtheprogramflowtotherespectiveinternalinterruptvector.Forthepulsewidthcapture mode,theinternalsystemclockisalsousedasthetimerclocksourcebutthetimerwillonlyrun whenthecorrectlogicconditionappearsontheexternaltimerinputpin.Asthisisanexternal eventandnotsynchronisedwiththeinternaltimerclock,themicrocontrollerwillonlyseethis externaleventwhenthenexttimerclockpulsearrives.Asaresult,theremaybesmalldifferences inmeasuredvaluesrequiringprogrammerstotakethisintoaccountduringprogramming.Thesame appliesifthetimerisconfiguredtobeintheeventcountingmode,whichagainisanexternalevent andnotsynchronisedwiththeinternalsystemortimerclock. WhentheTimer/EventCounterisread,orifdataiswrittentothepreloadregister,theclockis inhibitedtoavoiderrors,howeverasthismayresultinacountingerror,thisshouldbetakeninto accountbytheprogrammer.Caremustbetakentoensurethatthetimersareproperlyinitialised beforeusingthemforthefirsttime.Theassociatedtimerenablebitsintheinterruptcontrol registermustbeproperlysetotherwisetheinternalinterruptassociatedwiththetimerwillremain inactive.Theedgeselect,timermodeandclocksourcecontrolbitsintimercontrolregistermust alsobecorrectlysettoensurethetimerisproperlyconfiguredfortherequiredapplication.Itis alsoimportanttoensurethataninitialvalueisfirstloadedintothetimerregistersbeforethetimer isswitchedon;thisisbecauseafterpower-ontheinitialvaluesofthetimerregistersareunknown. Afterthetimerhasbeeninitialisedthetimercanbeturnedonandoffbycontrollingtheenablebitin thetimercontrolregister. WhentheTimer/EventCounteroverflows,itscorrespondinginterruptrequestflagintheinterrupt controlregisterwillbeset.IftheTimer/EventCounterinterruptisenabledthiswillinturngenerate aninterruptsignal.Howeverirrespectiveofwhethertheinterruptsareenabledornot,aTimer/Event Counteroverflowwillalsogenerateawake-upsignalifthedeviceisinaPower-downcondition.This situationmayoccuriftheTimer/EventCounterisintheEventCountingModeandiftheexternal signalcontinuestochangestate.Insuchacase,theTimer/EventCounterwillcontinuetocount theseexternaleventsandifanoverflowoccursthedevicewillbewokenupfromitsPower-down condition.Topreventsuchawake-upfromoccurring,thetimerinterruptrequestflagshouldfirstbe sethighbeforeissuingthe“HALT”instructiontoentertheSleepMode. |
Аналогичный номер детали - HT46R004 |
|
Аналогичное описание - HT46R004 |
|
|
ссылки URL |
Конфиденциальность |
ALLDATASHEETRU.COM |
Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
Family Site : ic2ic.com |
icmetro.com |