DS80C320-ECD DALLAS [Dallas Semiconductor], DS80C320-ECD Datasheet - Page 132

no-image

DS80C320-ECD

Manufacturer Part Number
DS80C320-ECD
Description
High-Speed Microcontroller User Guide
Manufacturer
DALLAS [Dallas Semiconductor]
Datasheet
TIMER/COUNTER 2 BAUD RATE GENERATOR MODE Figure 11-6
Timer Output Clock Generator
Timer 2 can also be configured to drive a clock output on port pin P1.0 (T2) as shown in Figure 11-7. To
configure Timer 2 for this mode, first it must be set to 16-bit auto-reload timer mode (CP/
C/
a logic 1 to enable the timer.
This mode will produce a 50% duty cycle square wave output. The frequency of the square wave is given
by the formula in the figure. Each timer overflow causes an edge transition on the pin, i.e., the state of
the pin toggles.
Note that this mode has two somewhat unique features in common with the baud rate generation mode.
First, the timebase is the crystal frequency divided by 2, and no other divider selection is possible.
Second, the timer itself will not generate an interrupt, but if needed, an additional external interrupt may
be caused using T2EX as described above. Because of the two mode’s similarities, the timer can be used
to generate both an external clock and a baud rate clock simultaneously. Once the clock out mode is
established, either TCLK or RCLK is set to 1, and the RCAP2 registers are loaded, the timer will provide
a clock to both functions.
T2
CLK MODE
DIVIDE BY 4 OSC/2
PMM1
PMM2
EXEN2 = T2CON.3
T2EX = P1.1
OSC INPUT TO TIMER
= 0). Next, the T2OE (T2MOD.1) bit must be set to a logic 1. TR2 (T2CON.2) must also be set to
TR2 = T2CON.2
T2 = P1.0
TIMER INPUT
OSC/82
OSC/512
C/
0
T2
1
= T2COD.1
0
0
T2CON.6
CLK
EXF2 =
RCAP2L
132 of 175
TL2
7
7 8
8
RCAP2H
TH2
TIMER 2
INTERRUPT
15
15
High-Speed Microcontroller User’s Guide
1
T2CON.5
T2CON.4
1
RCLK =
DIVIDE
TCLK =
BY 2
OVERFLOW
TIMER 1
0
0
0
DIVIDE
BY 16
1
DIVIDE
BY 16
SMOD =
WDCON.7
CLOCK
CLOCK
RL2
Rx
Tx
= 0,

Related parts for DS80C320-ECD