| 数据搜索系统,热门电子元器件搜索 |
|
HT86B05 数据表(PDF) 53 Page - Holtek Semiconductor Inc |
|
|
|||||||||||||||||||||||||||||
HT86B05 数据表(HTML) 53 Page - Holtek Semiconductor Inc |
|
53 / 79 page ![]() HT86BXX/HT86BRXX Rev. 1.60 53 October 20, 2009 T i m e r 2 T i m e r 4 R C O C O N O V B = 1 O V B = 0 E x t e r n a l R C O s c i l l a t i o n C o n v e r t e r I n t e r r u p t R e s e t R C O C O N R C O S C O u t p u t f S Y S / 4 C l o c k S e l e c t f S Y S R C O M O B i t Programming Considerations As the 16-bit Timers have both low byte and high byte timer registers, accessing these registers is carried out in a specific way. It must be noted that when using in- structions to preload data into the low byte registers, namely TMR2L or TMR4L, the data will only be placed into a low byte buffer and not directly into the low byte register. The actual transfer of the data into the low byte register is only carried out when a write to its associated high byte register, namely TMR2H or TMR4H, is exe- cuted. However, using instructions to preload data into the high byte timer register will result in the data being directly written to the high byte register. At the same time the data in the low byte buffer will be transferred into its associated low byte register. For this reason, when preloading data into the 16-bit timer registers, the low byte should be written first. It must also be noted that to read the contents of the low byte register, a read to the high byte register must first be executed to latch the con- tents of the low byte buffer into its associated low byte register. After this has been done, the low byte register can be read in the normal way. Note that reading the low byte timer register will only result in reading the previ- ously latched contents of the low byte buffer and not the actual contents of the low byte timer register. Program Example External RC oscillation converter mode example program - Timer 2 overflow: clr RCOCCR mov a, 00000010b ; Enable External RC oscillation mode and set Timer 2 ; overflow interrupt mov RCOCR,a clr intch.4 ; Clear External RC Oscillation Converter interrupt ; request flag mov a, low (65536-1000); Give timer 2 initial value mov Tmr2l, a ; Timer 2 count 1000 time and then overflow mov a, high (65536-1000) mov Tmr2h, a mov a, 00h ; Give timer 4 initial value mov Tmr4l, a mov a, 00h mov Tmr4h, a mov a, 00110000b ; Timer 2 clock source=fSYS/4 and timer on mov RCOCCR, a p10: clr Wdt snz intch.4 ; Polling External RC Oscillation Converter interrupt ; request flag jmp p10 clr intch.4 ; Clear External RC Oscillation Converter interrupt ; request flag ; Program continue |
|
链接网址 |
| 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 |