TS80C54 ATMEL [ATMEL Corporation], TS80C54 Datasheet - Page 15

no-image

TS80C54

Manufacturer Part Number
TS80C54
Description
8-bit CMOS Microcontroller 16/32 Kbytes ROM/OTP
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
Figure 8-1.
8.1.1
4431E–8051–04/06
Programmable Clock-Output
Auto-Reload Mode Up/Down Counter (DCEN = 1)
XTAL1
In the clock-out mode, timer 2 operates as a 50%-duty-cycle, programmable clock generator
(See Figure 8-2) . The input clock increments TL2 at frequency F
counts to overflow from a loaded value. At overflow, the contents of RCAP2H and RCAP2L reg-
isters are loaded into TH2 and TL2. In this mode, timer 2 overflows do not generate interrupts.
The formula gives the clock-out frequency as a function of the system oscillator frequency and
the value in the RCAP2H and RCAP2L registers :
For a 16 MHz system clock, timer 2 has a programmable frequency range of 61 Hz
(F
Timer 2 is programmed for the clock-out mode as follows:
• Set T2OE bit in T2MOD register.
• Clear C/T2 bit in T2CON register.
• Determine the 16-bit reload value from the formula and enter it in RCAP2H/RCAP2L
OSC
registers.
C l o c k O u t F r e q u e n c y
F
XTAL
/2
16)
to 4 MHz (F
OSC
F
OSC
/4). The generated clock signal is brought out to T2 pin (P1.0).
=
(DOWN COUNTING RELOAD VALUE)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4
×
(UP COUNTING RELOAD VALUE)
( : 6 i n X 2 m o d e )
(
65536
T2
:12
RCAP2L
(8-bit)
(8-bit)
(8-bit)
TL2
FFh
R C A P
F o s c
T2CONreg
RCAP2H
C/T2
(8-bit)
(8-bit)
TH2
(8-bit)
0
FFh
1
2
H
R C A P
T2CONreg
TR2
2
L
)
AT/TS8xC54/8X2
T2EX:
if DCEN=1, 1=UP
if DCEN=1, 0=DOWN
T2CONreg
T O G -
OSC
TF2
/2. The timer repeatedly
T2CONreg
EXF2
INTERRUPT
TIMER 2
15

Related parts for TS80C54