103
MC96F8204
ABOV Semiconductor Co., Ltd.
11.6 Timer 1/2
11.6.1 Overview
The 16-bit timer 1/2 consists of multiplexer, timer 1/2 A data register high/low, timer 1/2 B data register high/low and
timer 1/2 control register high/low (TnADRH, TnADRL, TnBDRH, TnBDRL, TnCRH, TnCRL).
It has four operating modes:
−
16-bit timer/counter mode
−
16-bit capture mode
−
16-bit PPG output mode (one-shot mode)
−
16-bit PPG output mode (repeat mode)
The timer/counter 1/2 can be clocked by an internal or an external clock source (ECn). The clock source is selected by
clock selection logic which is controlled by the clock selection bits (TnCK[2:0]).
−
TIMER 1/2 clock source: f
X
/1, 2, 4, 8, 64, 512, 2048 and ECn
In the capture mode, by EINT11/EINT12, the data is captured into input capture data register (TnBDRH/TnBDRL).
Timer 1/2 outputs the comparison result between counter and data register through TnO port in timer/counter mode.
Also Timer 1/2 outputs PWM wave form through PWMnO port in the PPG mode.
TnEN
P0FSRL[5:4](T1)
P0FSRL[7:6](T2)
TnMS[1:0]
TnCK[2:0]
Timer 1/2
1
10
10
00
XXX
16 Bit Timer/Counter Mode
1
00
00
01
XXX
16 Bit Capture Mode
1
10
10
10
XXX
16 Bit PPG Mode(one-shot mode)
1
10
10
11
XXX
16 Bit PPG Mode(repeat mode)
Table 11.7
Timer 1/2 Operating Modes
11.6.2 16-bit Timer/Counter Mode
The 16-bit timer/counter mode is selected by control register as shown in Figure 11.13.
The 16-bit timer have counter and data register. The counter register is increased by internal or external clock input.
Timer 1/2 can use the input clock with one of 1, 2, 4, 8, 64, 512 and 2048 prescaler division rates (TnCK[2:0]). When
the value of TnCNTH, TnCNTL and the value of TnADRH, TnADRL are identical in Timer 1/2 respectively, a match
signal is generated and the interrupt of Timer 1/2 occurs. The TnCNTH, TnCNTL value is automatically cleared by
match signal. It can be also cleared by software (TnCC).
The external clock (ECn) counts up the timer at the rising edge. If the ECn is selected as a clock source by TnCK[2:0],
ECn port should be set to the input port by P0[3:2] IO bit.
Содержание MC96F8204 Series
Страница 13: ...13 MC96F8204 ABOV Semiconductor Co Ltd 4 Package Diagram Figure 4 1 20 Pin SOP Package...
Страница 14: ...14 MC96F8204 ABOV Semiconductor Co Ltd Figure 4 2 20 Pin TSSOP Package...
Страница 15: ...15 MC96F8204 ABOV Semiconductor Co Ltd Figure 4 3 16 Pin SOPN Package...
Страница 16: ...16 MC96F8204 ABOV Semiconductor Co Ltd Figure 4 4 10 Pin SSOP Package...
Страница 17: ...17 MC96F8204 ABOV Semiconductor Co Ltd Figure 4 5 8 Pin SOP Package...