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

no-image

DS80C320-ECD

Manufacturer Part Number
DS80C320-ECD
Description
High-Speed Microcontroller User Guide
Manufacturer
DALLAS [Dallas Semiconductor]
Datasheet
TIMER/COUNTER 2 CLOCK OUT MODE Figure 11-7
TIME–BASE SELECTION
The High-Speed Microcontroller allows the user to select either 4 or 12 clocks as the time-base for each
timer independently. When using the 16-bit Timer/Counters in timer mode, the timer/counter counts the
oscillator cycles divided by a predetermined number. In the standard 8051, the 8051 timers count the
oscillator divided by 12, which is the standard 8051 machine cycle timing.
Microcontroller allows the option of setting the timers to operate from a divide by 4 of the input clock to
allow higher precision timing and faster baud rates. This selection has no effect on CPU timing, only on
the timers. Following a reset, the timers default to 12 clocks as the time-base to remain drop-in
compatible with the original 8051.
The 4 or 12 clock decision is independent for each timer and the default is 12 clocks per timer tick. As an
example, a user might select both the baud rate generator timer and one other timer to run at 12 clocks per
timer tick with the third timer at 4 clocks per tick. This allows one timer to measure higher speed events
or to gain better resolution. The control bits for the time-base selection are located in the Clock Control
register (CKCON;8Eh). Timer 2 will function at 2 clocks per tick when set for baud rate generation or
clock output as described above. When the time-base is derived from an external source (i.e., the T0, T1
or T2 pins), the timer operates at the frequency of the external source and is not affected by the setting of
the T0M, T1M, or T2M bits. The only limitation is that the external source frequency can be no faster
than 1/8 of the main oscillator frequency.
The use of Power Management modes will affect the input clock to the timer as shown in the illustrations.
In general, they will divide the input clock by either 16 or 256 for PMM1 and PMM2, respectively.
Timer 2, when operating in Baud Rate Generator or Clock Out mode normally uses the input clock
frequency divided by 2, but when PMM1 and PMM2 are used, it will operate from a time-base of the
input clock divided by 32 and 512, respectively.
CLK MODE
DIVIDE BY 4 OSC/2
PMM1
PMM2
F_OUT=
OSC INPUT
TO TIMER
(4*(65536-
RCAP2H,
RCAP2L))
OSC INPUT TO TIMER
EXEN2 = T2CON.3
T2EX = P1.1
TIMER INPUT
OSC/32
OSC/512
T2 = P1.0
T2MOD.1
T2OE =
T2CON.1
C/T2 =
= 0
133 of 175
T2CON.2
TR2 =
0
0
DIVIDE
BY 2
High-Speed Microcontroller User’s Guide
RCAP2L
TL2
T2CON.6
EXF2 =
7 8
7 8
RCAP2H
TH2
The High-Speed
TIMER 2
INTERRUPT
15
15

Related parts for DS80C320-ECD