MC81F4x16
18.4 Timer 0 16-BIT Mode
T0CS
T0OVIE
fxx/2048
fxx/512
fxx/128
fxx/32
fxx/16
fxx/8
fxx/4
fxx/2
fxt
EC0
Counter stop
16-Bit Comparator
M
U
X
Match M
U
X
Data BUS
OVF
M
U
X
Clear
T1CR
8
T0CR
Clear
T0OVIR
Timer 0 Overflow INT request
T0OVIF
T0CC
Match signal
T0MIE
Timer 0 INT enable
T0MIR
Timer 0 Match INT request
T0O/PWM0O
T0 Match
Interrupt
Timer 0 overflow INT enable
T0 Overflow
Interrupt
16-Bit Up Counter
R
(Read - only)
EXT1
Timer 0 Buffer Register
T0MS
T0CC
Overflow signal
Match signal
T0MIF
EINT0L
MSB
EXT1
Interrupt
Timer 0 Data Register
T1DR
8
Data BUS
T0DR
LSB
Timer 1 + Timer 0
Timer 0 (16bit)
Figure 18-3 16-bit Timer 0 Block Diagram
The 16-bit timer 0 is a 16-bit general-purpose timer. Timer 0 has three operating modes, you can
select one of them using the appropriate T0SCR setting:
- Interval timer mode (Toggle output at T0O pin)
- Capture input mode with a rising or falling edge trigger at EXT1 pin
- PWM mode (PWM0O)
The 16-bit timer 0 has the following functional components:
-
-
-
-
-
-
Clock frequency divider (fxx divided by 2048, 512, 128, 32, 16, 8, 4, 2, fxt) with multiplexer
External clock input pin, EC0 (R02)
I/O pins for capture input, EXT1 (R03) or PWM or match output PWM0O/T0O (R03)
16-bit counter (T0CR+T1CR), 16-bit comparator, and 16-bit reference data register
(T0DR+T1DR)
Timer 0 status and control register (T0SCR)
Timer 0 overflow interrupt and match interrupt generation
124
October 19, 2009 Ver.1.35