| Electronic Components Datasheet Search |
|
HT83B60 Datasheet(PDF) 32 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT83B60 Datasheet(HTML) 32 Page - Holtek Semiconductor Inc |
|
32 / 84 page ![]() Rev. 1.00 3� De�e��e� 1�� �011 Rev. 1.00 33 De�e��e� 1�� �011 HT83B60 Voice Mask MCU HT83B60 Voice Mask MCU Timer Program Example Thefollowingexampleprogramsectionisbasedonthedevice,whichcontaintwo8-bittimers. Programmingthetimerforotherdevicesisconductedinaverysimilarway.Theprogramshows howthetimerregistersaresetupalongwithhowtheinterruptsareenabledandmanaged.Pointsto noteintheexamplearehow,forthe8-bittimer.Notehowthetimeristurnedonbysettingbit4of therespectivetimercontrolregister.Thetimercanbeturnedoffinasimilarwaybyclearingthe samebit.ThisexampleprogramsetsthetimertobeinthetimermodewhichusestheinternalfSYSas theirclocksource,andproduceatimer0interruptper1ms. #include HT83B60.inc jmp begin : org 04h ; time base vector reti org 08h ; timer 0 interrupt vector jmptmr0int;jumpherewhentimer0overflowsevery1ms org 0Ch reti org 10h reti org 14h reti : ; internal timer 0 interrupt routine Tmr0int: : ; timer 0 main program placed here : reti : begin: ; setup timer 0 registers mov a,06h ; setup timer 0 low byte mov tmr0,a;flowbytemustbesetupbeforehighbyte mov a,094 ; setup timer 0 control register mov tmr0c,a ; setup timer mode and clock source is fsys/32 prescaler ; setup interrupt register mov a,05h ; enable global interrupt mov intc,a ; enable timer 0 interrupt |
|
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 |