MC95FG0128A
86
Aug 02, 2018 Ver.2.9
11.5 Timer/PWM
11.5.1 8-bit
Timer/Event Counter 0, 1
11.5.1.1 Overview
Timer 0 and timer 1 can be used either two 8-bit timer/counter or one 16-bit timer/counter with
combine them. Each 8-bit timer/event counter module has multiplexer, 8-bit timer data register, 8-bit
counter register, mode register, input capture register, comparator. For PWM, it has PWM register
(T1PPR, T1PDR, T1PWHR).
It has seven operating modes:
-
8 Bit Timer/Counter Mode
-
8 Bit Capture Mode
-
8 Bit Compare Output Mode
-
16 Bit Timer/Counter Mode
-
16 Bit Capture Mode
-
16 Bit Compare Output Mode
-
PWM Mode
Note> TxDR must be set to higher than 0x03 for guaranteeing operation.
The timer/counter can be clocked by an internal or external clock source (external EC0). The clock
source is selected by clock select logic which is controlled by the clock select (T0CK[2:0], T1CK[1:0]).
- TIMER0 clock source : fX/2, 4, 16, 64, 256, 1024, 4096, EC0
- TIMER1 clock source : fX/1, 2, 16, T0CK
In the capture mode, by INT0, INT1, the data is captured into Input Capture Register. The TIMER 0
outputs the compare result to T0 port in 8/16-bit mode. Also the timer 1 outputs the result T1 port in
the timer mode and the PWM wave form to PWM3 in the PWM mode.
Table 11-6 Operating Modes of Timer
16 Bit
CAP0
CAP1
PWM1E
T0CK[2:0]
T1CK[1:0]
T0/1_PE
TIMER 0
Timer 1
0
0
0
0
XXX
XX
00
8 Bit Timer
8 Bit Timer
0
0
1
0
111
XX
00
8 Bit Event Counter
8 Bit Capture
0
1
0
0
XXX
XX
01
8 Bit Capture
8 Bit Compare Output
0
0
0
1
XXX
XX
11
8 Bit Timer/Counter
10 Bit PWM
1
0
0
0
XXX
11
00
16 Bit Timer
1
0
0
0
111
11
00
16 Bit Event Counter
1
1
1
0
XXX
11
00
16 Bit Capture
1
0
0
0
XXX
11
01
16 Bit Compare Output
Summary of Contents for MC95FG0128A
Page 26: ...MC95FG0128A 26 Aug 02 2018 Ver 2 9 4 Package Diagram Figure 4 1 100 pin LQFP package...
Page 27: ...MC95FG0128A Aug 02 2018 Ver 2 9 27 Figure 4 2 80 pin LQFP package...
Page 28: ...MC95FG0128A 28 Aug 02 2018 Ver 2 9 Figure 4 3 80 pin MQFP package...
Page 29: ...MC95FG0128A Aug 02 2018 Ver 2 9 29 Figure 4 4 64 pin LQFP package...
Page 30: ...MC95FG0128A 30 Aug 02 2018 Ver 2 9 Figure 4 5 64 pin LQFP14 package...