MC97F2664
April 11, 2014 Ver. 1.4
145
11.7 Timer 6/7/8/9
11.7.1.1 Overview
The 16-bit timer 6/7/8/9 consists of multiplexer, timer 6/7/8/9 A data register high/low, timer 6/7/8/9 B data
register high/low and timer 6/7/8/9 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 6/7/8/9 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 n clock source: f
X
/1, 2, 4, 8, 64, 512, 2048 and ECn
In the capture mode, by EINT1n, the data is captured into input capture data register (TnBDRH/TnBDRL). Timer
6/7/8/9 outputs the comparison result between counter and data register through TnO port in timer/counter mode.
Also Timer 6/7/8/9 outputs PWM wave form through PWMnO port in the PPG mode.
Table 11-9 Timer 6/7/8/9 Operating Modes
TnEN
TnMS[1:0]
TnCK[2:0]
Timer 6/7/8/9
1
00
XXX
16 Bit Timer/Counter Mode
1
01
XXX
16 Bit Capture Mode
1
10
XXX
16 Bit PPG Mode
(one-shot mode)
1
11
XXX
16 Bit PPG Mode
(repeat mode)
11.7.2 16-Bit Timer/Counter Mode
The 16-bit timer/counter mode is selected by control register as shown in Figure 11.22.
The 16-bit timer have counter and data register. The counter register is increased by internal or external clock
input. Timer 6/7/8/9 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
6/7/8/9 respectively, a match signal is generated and the interrupt of Timer 6/7/8/9 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 P74IO, P35IO, P36IO, P37IO bit.
Содержание MC97F2664
Страница 20: ...MC97F2664 20 April 11 2014 Ver 1 4 4 Package Diagram Figure 4 1 64 Pin LQFP 1010 Package...
Страница 21: ...MC97F2664 April 11 2014 Ver 1 4 21 Figure 4 2 64 Pin LQFP 1414 Package...
Страница 22: ...MC97F2664 22 April 11 2014 Ver 1 4 Figure 4 3 64 Pin QFN Package...
Страница 23: ...MC97F2664 April 11 2014 Ver 1 4 23 Figure 4 4 44 Pin MQFP 1010 Package...