P80C32EBBB PHILIPS [NXP Semiconductors], P80C32EBBB Datasheet - Page 10

no-image

P80C32EBBB

Manufacturer Part Number
P80C32EBBB
Description
CMOS single-chip 8-bit microcontrollers
Manufacturer
PHILIPS [NXP Semiconductors]
Datasheets

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
P80C32EBBB
Manufacturer:
SANYO
Quantity:
1 005
Part Number:
P80C32EBBB
Manufacturer:
PHILIPS/飞利浦
Quantity:
20 000
Philips Semiconductors
Table 2.
Timer 2 as a baud rate generator is shown in Figure 4. This figure is
valid only if RCLK + TCLK = 1 in T2CON. Note that a rollover in TH2
does not set TF2, and will not generate an interrupt. Therefore, the
Timer 2 interrupt does not have to be disabled when Timer 2 is in
the baud rate generator mode. Note too, that if EXEN2 is set, a
1-to-0 transition in T2EX will set EXF2 but will not cause a reload
from (RCAP2H, RCAP2L) to (TH2, TL2). Thus when Timer 2 is in
use as a baud rate generator, T2EX can be used as an extra
external interrupt, if desired.
It should be noted that when Timer 2 is running (TR2 = 1) in “timer”
function in the baud rate generator mode, one should not try to read
or write TH2 or TL2. Under these conditions the timer is being
incremented every state time, and the results of a read or write may
not be accurate. The RCAP registers may be read, but should not
be written to, because a write might overlap a reload and cause
write and/or reload errors. Turn the timer off (clear TR2) before
accessing the Timer 2 or RCAP registers, in this case.
1996 Aug 16
CMOS single-chip 8-bit microcontrollers
RCLK + TCLK
OSC
T2EX Pin
T2 Pin
X
0
0
1
Timer 2 Operating Modes
2
Transition
Detector
NOTE: OSC. Freq. is divided by 2, not 12.
C/T2 = 0
C/T2 = 1
Note availability of additional external interrupt.
CP/RL2
X
X
0
1
EXEN2
Control
Figure 4. Timer 2 in Baud Rate Generator Mode
TR2
Control
EXF2
TR2
1
1
1
0
RCAP2L
(8-bits)
Interrupt
10
Timer 2
TL2
Timer/Counter 2 Set-up
Except for the baud rate generator mode, the values given for
T2CON do not include the setting of the TR2 bit. Therefore, bit TR2
must be set, separately, to turn the timer on. See Table 3 for set-up
of timer 2 as a timer. See Table 4 for set-up of timer 2 as a counter.
Using Timer/Counter 2 to Generate Baud Rates
For this purpose, Timer 2 must be used in the baud rate generating
mode. If Timer 2 is being clocked through pin T2 (P1.0) the baud
rate is:
And if it is being clocked internally, the baud rate is:
To obtain the reload value for RCAP2H and RCA02L, the above
equation can be rewritten as:
Baud Rate
Baud Rate
RCAP2H, RCAP2L
(8-bits)
16-bit Auto-reload
16-bit Capture
Baud rate generator
(off)
RCAP2H
TH2
Reload
Timer 2 Overflow Rate
32
[65536
Oscillator Frequency
65536
“1”
“1”
16
2
MODE
“0”
(RCAP2H, RCAP2L)]
“0”
“0”
Overflow
Oscillator Frequency
Timer 1
32
80C32/87C52
“1”
Baud Rate
Product specification
16
16
SMOD
RCLK
TCLK
RX Clock
TX Clock
SU00068

Related parts for P80C32EBBB