80C154 TEMIC Semiconductors, 80C154 Datasheet - Page 8

no-image

80C154

Manufacturer Part Number
80C154
Description
CMOS 0 to 36 MHz Single Chip 8-bit Microcontroller
Manufacturer
TEMIC Semiconductors
Datasheet
80C154/83C154
Hardware Description
Same as for the 80C51, plus a third timer/counter :
Timer/Event Counter 2
Timer 2 is a 16 bit timer/counter like Timers 0 and 1, it
can operate either as a timer or as an event counter. This
is selected by bit C/T2 in the Special Function Register
T2CON (Figure 1). It has three operating modes :
“capture”, “autoload” and “baud rate generator”, which
are selected by bits in T2CON as shown in Table 2.
In the capture mode there are two options which are
selected by bit EXEN2 in T2CON; If EXEN2 = 0, then
Timer 2 is a 16 bit timer or counter which upon
overflowing sets bit TF2, the Timer 2 overflow bit, which
can be used to generate an interrupt. If EXEN2 = 1, then
Timer 2 still does the above, but with the added feature
that a 1-to-0 transition at external input T2EX causes the
current value in the Timer 2 registers, TL2 and TH2, to
be captured into registers RCAP2L and RCAP2H,
respectively. In addition, the transition at T2EX causes bit
EXF2 in T2CON to be set, and EXF2, like TF2, can
generate an interrupt.
The capture mode is illustrated in Figure 7.
In the auto-reload mode there are again two options,
which are selected by bit EXEN2 in T2CON.If
8
Figure 6. External Drive Configuration.
Table 2.Timer 2 Operating Modes.
RCLK +
TCLK
X
0
0
1
CP/RL2
X
X
0
1
TR2
1
1
1
0
16 bit auto-reload
16 bit capture
baud rate generator
(off)
MODE
www.DataSheet4U.com
EXEN2 = 0, then when Timer 2 rolls over it does not only
set TF2 but also causes the Timer 2 register to be reloaded
with the 16 bit value in registers RCAP2L and RCAP2H,
which are preset by software. If EXEN2 = 1, then Timer
2 still does the above, but with the added feature that a
1-to-0 transition at external input T2EX will also trigger
the 16 bit reload and set EXF2.
The auto-reload mode is illustrated in Figure 8.
Figure 7. Timer 2 in Capture Mode.
Figure 8. Timer 2 in Auto-Reload Mode.
Rev.F (14 Jan. 97)
MATRA MHS

Related parts for 80C154