| 전자부품 데이터시트 검색엔진 |
|
HT83B60 데이터시트(PDF) 31 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT83B60 데이터시트(HTML) 31 Page - Holtek Semiconductor Inc |
|
31 / 84 page ![]() Rev. 1.00 30 De�e��e� 1�� �011 Rev. 1.00 31 De�e��e� 1�� �011 HT83B60 Voice Mask MCU HT83B60 Voice Mask MCU Configuring the Timer TheTimerisusedtomeasurefixedtimeintervals,providinganinternalinterruptsignaleachtime theTimeroverflows.TodothistheOperatingModeSelectbitpairintheTimerControlRegister mustbesettothecorrectvalueasshown. Control Register Operating Mode Select Bits Bit7 Bit6 1 0 Theinternalclock,fSYS,isusedastheTimerclock.However,thisclocksourceisfurtherdividedby aprescaler,thevalueofwhichisdeterminedbythePrescalerRateSelectbits,whicharebits0~2 intheTimerControlRegister.AftertheotherbitsintheTimerControlRegisterhavebeensetup, theenablebit,whichisbit4oftheTimerControlRegister,canbesethightoenabletheTimerto run.Eachtimeaninternalclockcycleoccurs,theTimerincrementsbyone.Whenitisfulland overflows,aninterruptsignalisgeneratedandtheTimerwillreloadthevaluealreadyloadedinto thepreloadregisterandcontinuecounting.TheinterruptcanbedisabledbyensuringthattheTimer InterruptEnablebitintheInterruptControlRegister,INTC,isresettozero. In cr em en t Ti me r C ont ro ll er Pr es ca le r Ou t put Ti me r + 1T im er + 2 Ti me r + NT im er + N + 1 Timer Mode Timing Diagram Prescaler Allofthe8-bittimerspossessaprescaler.Bits0~2oftheirassociatedtimercontrolregister,define thepre-scalingstagesoftheinternalclocksourceoftheTimer.TheTimeroverflowsignalcanbe usedtogeneratesignalsfortheTimerinterrupt. Programming Considerations Theinternalsystemclockisusedasthetimerclocksourceandisthereforesynchronizedwiththe overalloperationofthemicrocontroller.Inthismode,whentheappropriatetimerregisterisfull,the microcontrollerwillgenerateaninternalinterruptsignaldirectingtheprogramflowtotherespective internalinterruptvector. WhentheTimerisread,theclockisblockedtoavoiderrors,howeverasthismayresultina countingerror,thisshouldbetakenintoaccountbytheprogrammer.Caremustbetakentoensure thatthetimersareproperlyinitializedbeforeusingthemforthefirsttime.Theassociatedtimer enablebitsintheinterruptcontrolregistermustbeproperlysetotherwisetheinternalinterrupt associatedwiththetimerwillremaininactive.Theedgeselect,timermodeandclocksourcecontrol bitsintimercontrolregistermustalsobecorrectlysettoensurethetimerisproperlyconfigured fortherequiredapplication.Itisalsoimportanttoensurethataninitialvalueisfirstloadedintothe timerregistersbeforethetimerisswitchedon;thisisbecauseafterpower-ontheinitialvaluesofthe timerregistersareunknown.Afterthetimerhasbeeninitializedthetimercanbeturnedonandoff bycontrollingtheenablebitinthetimercontrolregister. |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 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 |