User`s guide

1/15/03 7-1
Chapter 7
8051-Compatible Timers
The LZ87010 includes standard 8051 counter/timers: Timer 0 and Timer 1. Both are 16-bit
count-up timers that can be clocked internally by PCLK or externally through the CTIN0
pin (Timer 0) or CTIN1 pin (Timer 1).
7.1 Timer Theory of Operation
The timers are controlled by two registers: TCON (timer control) and TMOD (timer mode).
Timer data is stored in four registers: TH0 and TL0 for Timer 0 high and low bytes, respec-
tively, and TH1 and TL1 for Timer 1.
Up to four pins are used with these timers: CTIN0, CTIN1, INT[0], and INT[1]. CTIN0 and
CTIN1 are the external clock signals for Timer 0 and Timer 1, respectively. The timer clock
is selected from either the external clock input or PCLK. See Figure 7-1.
Figure 7-1. Timer 0-1 Clocking
LZ87010-100
TCLK(x)
PCLK
CTIN(x)
INT(x)
1
0
TMOD.CT(x)
INTERNAL TO
THE LZ87010
EXTERNAL TO
THE LZ87010
TMOD.GATE(x) TCON.TR(x)