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

no-image

DS80C320-ECD

Manufacturer Part Number
DS80C320-ECD
Description
High-Speed Microcontroller User Guide
Manufacturer
DALLAS [Dallas Semiconductor]
Datasheet
MODE 2
This mode configures the timer as an 8-bit timer/ counter with automatic reload of the start value. This
configuration is shown in Figure 11-2, and is selected when bits M1and M0 of the TCON register are set
to 1 and 0 respectively. When configured in Mode 2, the timer uses TLn to count and THn to store the
reload value. Software must initialize both TLn and THn with the same starting value for the first count
to be correct. Once the TLn reaches FFh, it will be automatically loaded with the value in THn. The THn
value remains unchanged unless modified by software. Mode 2 is commonly used to generate baud rates
since it runs without continued software intervention. As in modes 0 and 1, mode 2 allows counting of
either oscillator cycles (crystal/12 or crystal/4) or pulses on pin Tn (C/T=1) when counting is enabled by
TRn and the proper setting of GATE and
TIMER/COUNTER 0 AND 1, MODE 2 Figure 11-2
MODE 3
This mode provides an 8-bit timer/counter and a second 8-bit timer as indicated in Figure 11-3. In Mode
3, TL0 is an 8-bit timer/counter controlled by the normal Timer 0 bits (TR0=TCON.4 and TF0=TCON.5).
TL0 can be used to count oscillator cycles (crystal/12 or crystal/ 4) or 1 to 0 transitions on pin T0 as
determined by C/
run control of the timer to an outside signal.
TH0 becomes an independent 8-bit Timer in Mode 3, however it can only count oscillator cycles (divided
by 12 or 4) as shown in the figure. In this mode, some of Timer 1’s control signals are used to manipulate
TH0. That is, TR1 (TCON.6) and TF1 (TCON.7) become the relevant control and flag bits associated
with TH0.
CLK MODE
DIVIDE BY 4 OSC/1
PMM1
2PMM2
OSC INPUT TO TIMER
(TR1 = TCON.6)
( INT1 = P3.3)
TR0 = TCON.4
INT0 = P3.2
(T1 = P3.5)
T0 = P3.4
TIMER INPUT
OSC/16
OSC/256
(GATE = TMOD.7)
GATE = TMOD.3
T
(TMOD.2). As in the other modes, the GATE function can use
DIVIDE
DIVIDE
BY 12
BY 4
(T1M = CKCON.4)
T0M = CKCON.3
INTn
pins.
125 of 175
0
1
0
1
(C/ T = TMOD.6)
CLK
C/ T = TMOD.2
SHOWN IN PARENTHESIS ()
0
High-Speed Microcontroller User’s Guide
0
TIMER 1 FUNCTIONS
(TF1 = TCON.7)
TF0 = TCON.5
(TH1)
(TL1)
TH0
TL0
7
INT0
7
RELOAD
to give external
INTERRUPT

Related parts for DS80C320-ECD