| поискавой системы для электроныых деталей |
|
HT82B42R датащи(PDF) 32 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT82B42R датащи(HTML) 32 Page - Holtek Semiconductor Inc |
|
32 / 86 page ![]() Rev. 1.00 32 October 27, 2011 Rev. 1.00 33 October 27, 2011 HT82B42R/HT82B42RE I/O MCU with USB Interface Configuring the Timer Mode Inthismode,theTimer/EventCountercanbeutilisedtomeasurefixedtimeintervals,providingan internalinterruptsignaleachtimetheTimer/EventCounteroverflows.Tooperateinthismode,the OperatingModeSelectbitpair,T0M1/T0M0orT1M1/T1M0,intheTimerControlRegistermust besettothecorrectvalueasshown. Control Register Operating Mode Select Bits for the Timer Mode Bit7 Bit6 1 0 Inthismodetheinternalclock,fSYS/4isusedastheinternalclockfortheTimer/EventCounters. AftertheotherbitsintheTimerControlRegisterhavebeensetup,theenablebitT0ONorT1ON, whichisbit4oftheTimerControlRegister,canbesethightoenabletheTimer/EventCounterto run.Eachtimeaninternalclockcycleoccurs,theTimer/EventCounterincrementsbyone.Whenit isfullandoverflows,aninterruptsignalisgeneratedandtheTimer/EventCounterwillreloadthe valuealreadyloadedintothepreloadregisterandcontinuecounting.Theinterruptcanbedisabled byensuringthattheTimer/EventCounterInterruptEnablebitintheInterruptControlRegister, INTC0,isresettozero. In cr em en t Ti me r C ont ro ll er Pr e sca le r Ou t put Ti me r + 1 Ti me r + 2 Ti me r + NT im er + N + 1 Timer Mode Timing Chart Configuring the Event Counter Mode Inthismode,anumberofexternallychanginglogicevents,occurringontheexternaltimerpin,can berecordedbytheTimer/EventCounter.Tooperateinthismode,theOperatingModeSelectbit pair,T0M1/T0M0orT1M1/T1M0,intheTimerControlRegistermustbesettothecorrectvalueas shown. Control Register Operating Mode Select Bits for the Event Counter Mode Bit7 Bit6 0 1 Inthismode,theexternaltimerpin,TMR0orTMR1,isusedastheTimer/EventCounterclock source,howeveritisnotdividedbytheinternalprescaler.AftertheotherbitsintheTimerControl Registerhavebeensetup,theenablebitT0ONorT1ON,whichisbit4oftheTimerControl Register,canbesethightoenabletheTimer/EventCountertorun.IftheActiveEdgeSelectbitT0E orT1E,whichisbit3oftheTimerControlRegister,islow,theTimer/EventCounterwillincrement eachtimetheexternaltimerpinreceivesalowtohightransition.IftheActiveEdgeSelectbitis high,thecounterwillincrementeachtimetheexternaltimerpinreceivesahightolowtransition. Whenitisfullandoverflows,aninterruptsignalisgeneratedandtheTimer/EventCounterwill reloadthevaluealreadyloadedintothepreloadregisterandcontinuecounting.Theinterruptcan bedisabledbyensuringthattheTimer/EventCounterInterruptEnablebitintheInterruptControl Register,INTC0,isresettozero. AstheexternaltimerpinissharedwithanI/Opin,toensurethatthepinisconfiguredtooperateas aneventcounterinputpin,twothingshavetohappen.ThefirstistoensurethattheOperatingMode SelectbitsintheTimerControlRegisterplacetheTimer/EventCounterintheEventCounting Mode,thesecondistoensurethattheportcontrolregisterconfiguresthepinasaninput.Itshould benotedthatintheeventcountingmode,evenifthemicrocontrollerisinthePowerDownMode, theTimer/EventCounterwillcontinuetorecordexternallychanginglogiceventsonthetimer inputpin.Asaresultwhenthetimeroverflowsitwillgenerateatimerinterruptandcorresponding wake-upsource. |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ 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 |