FlashFlex51 MCU
SST89E52RD2 / SST89E54RD2 / SST89E58RD2 / SST89E516RD2
SST89V52RD2 / SST89V54RD2 / SST89V58RD2 / SST89V516RD2
Preliminary Specifications
TABLE
5-2: TIMER/COUNTER 1
5.0 TIMERS/COUNTERS
TMOD
5.1 Timers
Internal External
Control1 Control2
Mode
Function
13-bit Timer
The device has three 16-bit registers that can be used as
either timers or event counters. The three timers/counters
are denoted Timer 0 (T0), Timer 1 (T1), and Timer 2 (T2).
Each is designated a pair of 8-bit registers in the SFRs.
The pair consists of a most significant (high) byte and least
significant (low) byte. The respective registers are TL0,
TH0, TL1, TH1, TL2, and TH2.
0
1
2
3
0
1
2
3
00H
10H
20H
30H
40H
50H
60H
-
80H
90H
A0H
B0H
C0H
D0H
E0H
16-bit Timer
Used as
Timer
8-bit Auto-Reload
Does not run
13-bit Timer
16-bit Timer
Used as
Counter
8-bit Auto-Reload
Not available
5.2 Timer Set-up
-
Refer to Table 3-10 for TMOD, TCON, and T2CON regis-
ters regarding timers T0, T1, and T2. The following tables
provide TMOD values to be used to set up Timers T0, T1,
and T2.
T5-2.0 1255
1. The Timer is turned ON/OFF by setting/clearing bit
TR1 in the software.
2. The Timer is turned ON/OFF by the 1 to 0 transition
on INT1# (P3.3) when TR1 = 1 (hardware control).
Except for the baud rate generator mode, the values given
for T2CON do not include the setting of the TR2 bit. There-
fore, bit TR2 must be set separately to turn the timer on.
TABLE
5-3: TIMER/COUNTER 2
T2CON
Internal
External
TABLE
5-1: TIMER/COUNTER 0
Mode
Control1
00H
Control2
08H
TMOD
16-bit Auto-Reload
16-bit Capture
Internal External
Control1 Control2
01H
09H
Mode
Function
13-bit Timer
Used as
Timer
Baud rate generator
receive and transmit
same baud rate
34H
36H
0
1
2
3
0
1
2
3
00H
01H
02H
03H
04H
05H
06H
07H
08H
09H
0AH
0BH
0CH
0DH
0EH
16-bit Timer
Used as
Timer
8-bit Auto-Reload
Two 8-bit Timers
13-bit Timer
Receive only
Transmit only
24H
14H
02H
03H
26H
16H
0AH
16-bit Auto-Reload
16-bit Capture
Used as
Counter
16-bit Timer
Used as
Counter
0BH
8-bit Auto-Reload
Two 8-bit Timers
T5-3.0 1255
1. Capture/Reload occurs only on timer/counter overflow.
2. Capture/Reload occurs on timer/counter overflow and a 1
to 0 transition on T2EX (P1.1) pin except when Timer 2 is
used in the baud rate generating mode.
0FH
T5-1.0 1255
1. The Timer is turned ON/OFF by setting/clearing
bit TR0 in the software.
2. The Timer is turned ON/OFF by the 1 to 0 transition
on INT0# (P3.2) when TR0 = 1 (hardware control).
©2004 Silicon Storage Technology, Inc.
S71255-00-000
3/04
44