| 数据搜索系统,热门电子元器件搜索 |
|
AT89LP51 数据表(PDF) 47 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
AT89LP51 数据表(HTML) 47 Page - ATMEL Corporation |
|
47 / 113 page ![]() 47 3709C–MICRO–5/11 AT89LP51/52 - Preliminary 11.1 Mode 0 – 13-bit Timer/Counter Both Timers in Mode 0 are 8-bit Counters with a divide-by-32 prescaler. Figure 11-1 shows the Mode 0 operation as it applies to Timer 1. As the count rolls over from all “1”s to all “0”s, it sets the Timer interrupt flag TF1. The counter input is enabled to the Timer when TR1 = 1 and either GATE1 = 0 or INT1 =1. Setting GATE1 = 1 allows the Timer to be controlled by external input INT1, to facilitate pulse width measurements. TR1 is a control bit in the Special Function Regis- ter TCON. GATE1 is in TMOD. The 13-bit register consists of all 8 bits of TH1 and the lower 5 bits of TL1. The upper 3 bits of TL1 are indeterminate and should be ignored. Setting the run flag (TR1) does not clear the registers. Figure 11-1. Timer/Counter 1 Mode 0: 13-bit Counter Mode 0 operation is the same for Timer 0 as for Timer 1, except that TR0, TF0, GATE0 and INT0 replace the corresponding Timer 1 signals in Figure 11-1. There are two different C/T bits, one for Timer 1 (TMOD.6) and one for Timer 0 (TMOD.2). 11.2 Mode 1 – 16-bit Timer/Counter In Mode 1 the Timers are configured for 16-bit operation. The Timer register is run with all 16 bits and the clock is applied to the combined high and low timer registers (TH1/TL1). As clock pulses are received, the timer counts up: 0000H, 0001H, 0002H, etc. An overflow occurs on the FFFFH-to-0000H transition, upon which the overflow flag bit in TCON is set. See Figure 11-2. Mode 1 operation is the same for Timer/Counter 0. Figure 11-2. Timer/Counter 1 Mode 1: 16-bit Counter Mode 0: Time-out Period 8192 System Frequency -------------------------------------------------- TPS 1 + () × = OSC T1 Pin TR1 GATE1 INT1 Pin TL1 (5 Bits) Control Interrupt C/T = 0 C/T = 1 TH1 (8 Bits) TF1 ÷CDV ÷TPS Mode 1: Time-out Period 65536 System Frequency -------------------------------------------------- TPS 1 + () × = OSC T1 Pin TR1 GATE1 INT1 Pin TL1 (8 Bits) Control Interrupt C/T = 0 C/T =1 TH1 (8 Bits) TF1 ÷CDV ÷TPS |
|
链接网址 |
| 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 |