English
Language : 

DS89C420-QCL Datasheet, PDF (107/139 Pages) Maxim Integrated Products – Ultra-High-Speed Flash Microcontroller User’s Guide
Ultra-High-Speed Flash
Microcontroller User’s Guide
OSC INPUT TO TIMER
CLK MODE TIMER INPUT
DIVIDE BY 1 OSC / 2
2X
OSC / 2
4X
OSC / 2
PMM ( / 1024) OSC / 2048
C / T2 = T2CON.1
0
TIMER 1
OVERFLOW
DIVIDE-
BY-2
SMOD_0 =
PCON.7
0
1
1
T2 = P1.0
TR2 = T2CON.2
T2EX = P1.1
EXEN2 = T2CON.3
CLK
0
TL2
78
15
TH2
RCLK =
T2CON.5
1
0
RCAP2L RCAP2H
0
78
15
TCLK =
T2CON.4
1
0
EXF2 =
T2CON.6
TIMER 2
INTERRUPT
DIVIDE-
BY-16
Rx
CLOCK
DIVIDE-
BY-1 6
Tx
CLOCK
Figure 11-7. Timer/Counter 2 Baud-Rate Generator Mode
Another feature of the baud-rate generator mode is that the crystal-derived time base for the timer is the crystal frequency divided by
2. No other crystal-divider selection is possible unless operating in power-management mode. If a different time base is desired, bit
C/T2 (T2CON.1) may be set to a 1, sourcing the time base from an external clock source supplied by the user on pin T2 (P1.0). The
RCAP registers may be read, but not modified, while TR2 = 1. Stop the timer (TR2 = 0) to modify these registers.
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-8. To configure timer 2 for this mode,
it must first be set to 16-bit autoreload timer mode (CP/RL2 = 0, C/T2 = 0). Next, the T2OE (T2MOD.1) bit must be set to a logic 1. TR2
(T2CON.2) must also be set to a logic 1 to enable the timer.
This mode produces a 50% duty cycle square-wave output. The frequency of the square wave is given by the formula in Figure 11-7.
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 time base is the crys-
tal frequency divided by 2, and other than power-management mode operation, no other divider selection is possible. Second, the
timer itself does not generate an interrupt, but, if needed, an additional external interrupt may be caused using T2EX as described
above. Because of the two modes’ similarities, the timer can be used to generate both an external clock and a baud-rate clock simul-
taneously. Once the clock-out mode is established, either TCLK or RCLK is set to 1, and the RCAP2 registers are loaded, the timer
provides a clock to both functions.
Time-Base Selection
The ultra-high-speed microcontroller allows the user to select the time base for each timer independently. In the standard 8051, the
timers count the oscillator divided by 12, which is the standard 8051 machine cycle timing. Following a reset, the timers default to an
oscillator divided-by-12 input clock to remain drop-in compatible with the original 8051. The ultra-high-speed microcontroller timers
can additionally be configured to use the system clock or the system clock divided by 4 for the input clock. These selections, while not
affecting the CPU timing, allow for higher precision timing and faster baud rates. As an example, a user might select both the baud-
rate generator timer and another timer to run at 12 oscillator clocks per timer tick with the third timer running at four system clocks per
tick. This allows one timer to measure higher speed events or to gain better resolution.
107 ____________________________________________________________________________________________