
CMT2380F17
Rev0.1 | 136/347
www.cmostek.com
Figure 16-11. Timer 1 in Clock Output Mode
How to Program Timer 0/1 in Clock-out Mode
•
Select Timer 0/1 clock source.
•
Determine the 8-bit reload value from the formula and enter it in the TH0/TH1 register.
•
Enter the same reload value as the initial value in the TL0/TL1 register.
•
Set T0CKOE/T1CKOE bit in AUXR2 register.
•
Set TR0/TR1 bit in TCON register to start the Timer 0/1.
In the Clock-Out mode, Timer 0/1 rollovers will not generate an interrupt This is similar to when Timer 1 is
used as a baud-rate generator. It is possible to use Timer 1 as a baud rate generator and a clock generator
simultaneously. Note, however, that the baud-rate and the clock-out frequency depend on the same overflow
rate of Timer 1. So, software usually disables the Timer 0/1 interrupt in this kind of application.
16.1.6
Timer 0/1 Register
TCON
:
Timer/Counter Control Register
SFR Page
= 0~F
SFR Address = 0x88
Bit
7
6
5
4
3
2
1
0
Name
TF1
TR1
TF0
TR0
IE1
IT1
IE0
IT0
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
R/W
Reset Value
0
0
0
0
0
0
0
0
Bit 7: TF1, Timer 1 overflow flag.
0: Cleared by hardware when the processor vectors to the interrupt routine, or cleared by software. 1: Set
by hardware on Timer/Counter 1 overflow, or set by software.
Bit 6: TR1, Timer 1 Run control bit. 0: Disabled to stop Timer/Counter 1.
1: Enabled to start Timer/Counter 1.
Bit 5: TF0, Timer 0 overflow flag.
0: Cleared by hardware when the processor vectors to the interrupt routine, or cleared by software. 1: Set
by hardware on Timer/Counter 0 overflow, or set by software.
Bit 4: TR0, Timer 0 Run control bit. 0: Disabled to stop Timer/Counter 0.
1: Enabled to start Timer/Counter 0.
TMOD
:
Timer/Counter Mode Control Register
Содержание CMT2380F17
Страница 27: ...CMT2380F17 Rev0 1 27 347 www cmostek com 1 25 Phase Noise...
Страница 111: ...CMT2380F17 Rev0 1 111 347 www cmostek com INT2IS 1 0 Selected Port Pin of nINT2 00 P4 4 01 P3 0 10 P1 1 11 P1 6...
Страница 131: ...CMT2380F17 Rev0 1 131 347 www cmostek com Figure 16 1 Timer 0 Mode 0 Structure Figure15 2 Timer 1 Mode 0 Structure...
Страница 161: ...CMT2380F17 Rev0 1 161 347 www cmostek com Figure 16 32 Split Timer 3 Mode 1 Structure AR with Ex INT...
Страница 177: ...CMT2380F17 Rev0 1 177 347 www cmostek com Figure 17 3 PCA Interrupt System...
Страница 239: ...CMT2380F17 Rev0 1 239 347 www cmostek com Figure 19 5 8 bit Timer Mode Configuration for S1BRG S1TME 1...
Страница 246: ...CMT2380F17 Rev0 1 246 347 www cmostek com SnMIPS S0MI S1MI 1 P3 3 P4 7...
Страница 289: ...CMT2380F17 Rev0 1 289 347 www cmostek com...