| Electronic Components Datasheet Search |
|
HT46R002 Datasheet(PDF) 45 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT46R002 Datasheet(HTML) 45 Page - Holtek Semiconductor Inc |
|
45 / 83 page ![]() Rev. 1.21 44 April 11, 2017 Rev. 1.21 45 April 11, 2017 HT46R002/HT46R003 Cost-Effective A/D 8-Bit OTP MCU HT46R002/HT46R003 Cost-Effective A/D 8-Bit OTP MCU 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. ThissituationmayoccuriftheTimer/EventCounterisintheEventCountingModeandifthe externalsignalcontinuestochangestate.Insuchacase,theTimer/EventCounterwillcontinueto counttheseexternaleventsandifanoverflowoccursthedevicewillbewokenupfromitsPower- downcondition.Topreventsuchawake-upfromoccurring,thetimerinterruptrequestflagshould firstbesethighbeforeissuingthe“HALT”instructiontoentertheSleepMode. |
|
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 |