| Os motores de busca de Datasheet de Componentes eletrônicos |
|
AT89C5132-ROTIL Folha de dados(PDF) 52 Page - ATMEL Corporation |
|
|
|||||||||||||||||||||||||||||
AT89C5132-ROTIL Folha de dados(HTML) 52 Page - ATMEL Corporation |
|
52 / 182 page ![]() 52 4173E–USB–09/07 AT89C5132 Counter. TL0 uses the Timer 0 control Bits C/T0# and GATE0 in TMOD register, and TR0 and TF0 in TCON register in the normal manner. TH0 is locked into a Timer function (counting FTF1/6) and takes over use of the Timer 1 interrupt (TF1) and run control (TR1) Bits. Thus, oper- ation of Timer 1 is restricted when Timer 0 is in mode 3. Figure 12-7 gives the autoreload period calculation formulas for both TF0 and TF1 flags. Figure 12-8. Timer/Counter 0 in Mode 3: Two 8-bit Counters Figure 12-9. Mode 3 Overflow Period Formula 12.4 Timer 1 Timer 1 is identical to Timer 0 excepted for Mode 3 which is a hold-count mode. Following com- ments help to understand the differences: • Timer 1 functions as either a Timer or event Counter in three modes of operation. Figure 12- 2 through Figure 12-6 show the logical configuration for modes 0, 1, and 2. Timer 1’s mode 3 is a hold-count mode. • Timer 1 is controlled by the four high-order Bits of TMOD register (see Table 41) and Bits 2, 3, 6 and 7 of TCON register (see Figure 40). TMOD register selects the method of Timer gating (GATE1), Timer or Counter operation (C/T1#) and mode of operation (M11 and M01). TCON register provides Timer 1 control functions: overflow flag (TF1), run control bit (TR1), interrupt flag (IE1) and interrupt type control bit (IT1). • Timer 1 can serve as the Baud Rate Generator for the Serial Port. Mode 2 is best suited for this purpose. • For normal Timer operation (GATE1 = 0), setting TR1 allows TL1 to be incremented by the selected input. Setting GATE1 and TR1 allows external pin INT1 to control Timer operation. • Timer 1 overflow (count rolls over from all 1s to all 0s) sets the TF1 flag generating an interrupt request. • When Timer 0 is in mode 3, it uses Timer 1’s overflow flag (TF1) and run control bit (TR1). For this situation, use Timer 1 only for applications that do not require an interrupt (such as a Baud Rate Generator for the Serial Port) and switch Timer 1 in and out of mode 3 to turn it off and on. • It is important to stop the Timer/Counter before changing modes. TR0 TCON.4 TF0 TCON.5 INT0 0 1 GATE0 TMOD.3 Overflow Timer 0 Interrupt Request C/T0# TMOD.2 TL0 (8 Bits) TR1 TCON.6 TH0 (8 Bits) TF1 TCON.7 Overflow Timer 1 Interrupt Request T0 TIM0 CLOCK ÷ 6 TIM0 CLOCK ÷ 6 TF0 PER = FTIM0 6 ⋅ (256 – TL0) TF1 PER = F TIM0 6 ⋅ (256 – TH0) |
|
Ligação URL |
| ALLDATASHEET é útil para você? [ DONATE ] |
Sobre Alldatasheet | Publicidade | Contato conosco | Privacy Policy | Link para a ficha técnica | roca de Link | Lista de Fabricantes 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 |