English
Language : 

Z51F3220FNX Datasheet, PDF (115/312 Pages) Zilog, Inc. – Z8051 Series 8-Bit Microcontrollers
Z51F3220
Product Specification
11.5.2 8-Bit Timer/Counter Mode
The 8-bit timer/counter mode is selected by control register as shown in Figure 11.6.
The 8-bit timer have counter and data register. The counter register is increased by internal or external clock
input. Timer 0 can use the input clock with one of 2, 4, 8, 32, 128, 512 and 2048 prescaler division rates
(T0CK[2:0]). When the value of T0CNT and T0DR is identical in timer 0, a match signal is generated and the
interrupt of Timer 0 occurs. T0CNT value is automatically cleared by match signal. It can be also cleared by
software (T0CC).
The external clock (EC0) counts up the timer at the rising edge. If the EC0 is selected as a clock source by
T0CK[2:0], EC0 port should be set to the input port by P52IO bit.
T0CR
T0EN
1
-
T0MS1 T0MS0 T0CK2 T0CK1 T0CK0 T0CC
ADDRESS : B2 H
INITIAL VALUE: 0000 _0000B
-
0
0
x
x
x
x
EC0
fx
P
fx/2
r
fx/4
e
fx/8
M
s
U
c
fx/32
X
a fx/128
l fx/512
e
r fx/2048
T0 EN
3
T0CK[2:0 ]
8-bit Timer 0 Counter
T0CNT(8Bit)
Clear
Match
MUX
Comparator
T0DR(8Bit)
8-bit Timer 0 Data Register
2
T0MS[1:0]
Match signal
T0 CC
INT_ACK
Clear
T0IFR
To interrupt
block
T0 O/PWM0O
Figure 11.6 8-Bit Timer/Counter Mode for Timer 0
T0CNT
Value
Timer 0
(T0IFR)
Interrupt
PS029902-0212
Match with T0DR
n
n-1
n-2
Up-count 6
5
4
3
2
1
0
Interrupt Period
= PCP x (n+1)
Count Pulse Period
PCP
Occur
Interrupt
Occur
Interrupt
Figure 11.7 8-Bit Timer/Counter 0 Example
PRELIMINARY
TIME
Occur
Interrupt
112