| Electronic Components Datasheet Search |
|
HT45F12 Datasheet(PDF) 61 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT45F12 Datasheet(HTML) 61 Page - Holtek Semiconductor Inc |
|
61 / 104 page ![]() Rev. 0.00 �0 �e�te��e� ��� �01� Rev. 0.00 �1 �e�te��e� ��� �01� HT45F12 8-Bit Flash MCU with Op Amps & Comparators HT45F12 8-Bit Flash MCU with Op Amps & Comparators Prescaler BitsTPSC0~TPSC2oftheTMRCregistercanbeusedtodefinethepre-scalingstagesoftheinternal clocksourcesoftheTimer/EventCounter.TheTimer/EventCounteroverflowsignalcanbeusedto generatesignalsforthePFDandTimerInterrupt. I/O Interfacing TheTimer/EventCounter,whenconfiguredtorunintheeventcounterorpulsewidthmeasurement mode,requirestheuseoftheexternalpinforcorrectoperation.Asthispinisasharedpinitmustbe configuredcorrectlytoensureitissetupforuseasaTimer/EventCounterinputandnotasanormal I/Opin.ThisisimplementedbyensuringthatthemodeselectbitsintheTimer/EventCounter controlregister,selecteithertheeventcounterorpulsewidthmeasurementmode.Additionally thePortControlRegistermustbesethightoensurethatthepinissetupasaninput.Anypull-high resistoronthispinwillremainvalidevenifthepinisusedasaTimer/EventCounterinput. Timer/Event Counter Pin Internal Filter TheexternalTimer/EventCounterpinisconnectedtoaninternalfiltertoreducethepossibilityof unwantedeventcountingeventsorinaccuratepulsewidthmeasurementsduetoadversenoiseor spikesontheexternalTimer/EventCounterinputsignal.Asthisinternalfiltercircuitwillconsume alimitedamountofpower,aconfigurationoptionisprovidedtoswitchoffthefilterfunction,an optionwhichmaybebeneficialinpowersensitiveapplications,butinwhichtheintegrityofthe inputsignalishigh.Caremustbetakenwhenusingthefilteron/offconfigurationoptionasitwillbe appliednotonlytotheexternalTimer/EventCounterpinbutalsototheexternalinterruptinputpins. IndividualTimer/EventCounterorexternalinterruptpinscannotbeselectedtohaveafilteron/off function. Programming Considerations Whenconfiguredtoruninthetimermode,theinternalsystemclockisusedasthetimerclock sourceandisthereforesynchronisedwiththeoveralloperationofthemicrocontroller.Inthismode whentheappropriatetimerregisterisfull,themicrocontrollerwillgenerateaninternalinterrupt signaldirectingtheprogramflowtotherespectiveinternalinterruptvector.Forthepulsewidth measurementmode,theinternalsystemclockisalsousedasthetimerclocksourcebutthetimer willonlyrunwhenthecorrectlogicconditionappearsontheexternaltimerinputpin.Asthisis anexternaleventandnotsynchronizedwiththeinternaltimerclock,themicrocontrollerwillonly seethisexternaleventwhenthenexttimerclockpulsearrives.Asaresult,theremaybesmall differencesinmeasuredvaluesrequiringprogrammerstotakethisintoaccountduringprogramming. Thesameappliesifthetimerisconfiguredtobeintheeventcountingmode,whichagainisan externaleventandnotsynchronisedwiththeinternalsystemortimerclock. WhentheTimer/EventCounterisread,orifdataiswrittentothepreloadregister,theclockis inhibitedtoavoiderrors,howeverasthismayresultinacountingerror,thisshouldbetakeninto accountbytheprogrammer.Caremustbetakentoensurethatthetimerisproperlyinitialisedbefore usingitforthefirsttime.Theassociatedtimerenablebitintheinterruptcontrolregistermustbe properlysetotherwisetheinternalinterruptassociatedwiththetimerwillremaininactive.The edgeselect,timermodeandclocksourcecontrolbitintimercontrolregistermustalsobecorrectly settoensurethetimerisproperlyconfiguredfortherequiredapplication.Itisalsoimportantto ensurethataninitialvalueisfirstloadedintothetimerregisterbeforethetimerisswitchedon;this isbecauseafterpower-ontheinitialvaluesofthetimerregistersareunknown.Afterthetimerhas beeninitialisedthetimercanbeturnedonandoffbycontrollingtheenablebitinthetimercontrol register.Notethatsettingthetimerenablebithightoturnthetimeron,shouldonlybeexecutedafter |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |