English
Language : 

DS89C420-QCL Datasheet, PDF (114/139 Pages) Maxim Integrated Products – Ultra-High-Speed Flash Microcontroller User’s Guide
Ultra-High-Speed Flash
Microcontroller User’s Guide
Table 12-3. Mode 0 Serial Port Clock Frequency
SYSTEM CLOCK MODE
Crystal multiply mode 4X
Crystal multiply mode 2X
Divide-by-1 (default)
Power-management mode (/1024)
PMR REGISTER BITS
4X/2X, CD1, CD0
100
000
X01, X10
X11
MODE 0
SERIAL PORT CLOCK FREQUENCY
SM2 = 0
SM2 = 1
OSC / 3
OSC / 1
OSC / 6
OSC / 2
OSC / 12
OSC / 4
OSC / 3072
OSC / 1024
Mode 2
In this asynchronous mode, baud rates are derived directly from the oscillator input. The following table summarizes baud-rate gener-
ation as a function of the external oscillator frequency. This mode works identically to the original 8051 family.
The default case is divide-by-64. The user can effectively double the serial port clock frequency by setting the SMOD bit to a logic 1
for the associated UART. For serial port 0, the SMOD_0 bit is PCON.7. This is the original location in the 8051 family. For serial port 1,
the SMOD_1 bit is WDCON.7. When operating in the power management mode (CD1:0 = 11b), the serial port clock frequency is the
oscillator frequency divided by 16384 when the SMOD bit is a logic 0 and twice that frequency (OSC/8192) when the SMOD doubler
bit is a logic 1. SMOD bits default to a logic 0 on all resets.
Table 12-4. Mode 2 Serial Port Clock Frequency
SYSTEM CLOCK MODE
Crystal multiply mode 4X
Crystal multiply mode 2X
Divide-by-1 (default)
Power-management mode (/1024)
PMR REGISTER BITS
4X/2X, CD1, CD0
100
000
X01, X10
X11
MODE 2
SERIAL PORT CLOCK FREQUENCY
SMOD = 0
SMOD = 1
OSC / 64
OSC / 32
OSC / 64
OSC / 32
OSC / 64
OSC / 32
OSC / 16384
OSC / 8192
Mode 1 or 3
These asynchronous modes are commonly used for communication with PCs, modems, and other similar interfaces. The baud rates
and bit timing are generated using either timer 1 or timer 2. The respective timer is placed in autoreload mode. When the timer reach-
es its rollover condition (FFFFh - timer 2 or FFh - timer 1), a clock is sent to the baud-rate circuit. The baud-rate circuit generates the
exact baud rate by further dividing the clock by 16 or 32 (depending upon the UART baud-rate doubler bit).
For serial port 0, either timer 1 or 2 can be used to generate baud rates. For serial port 1, only timer 1 can be used as the baud-rate
generator. If operated in mode 1 or 3, the two UARTs may both use timer 1 for baud-rate generation, if desired.
Using Timer 1 for Baud-Rate Generation
To use timer 1 as the baud-rate generator, it is commonly put into the 8-bit autoreload mode. In this way, the CPU is not involved in
baud-rate generation. Note that the timer interrupt should not be enabled. In the 8-bit autoreload mode (timer 1, mode 2), the reload
value is stored in TH1. Thus, the combination of timer 1 input clock frequency and TH1 determine the baud rate.
The timer 1 input clock, relative to the external crystal clock, can be altered in two ways: 1) changing the system clock, or 2) chang-
ing the timer input clock divide ratio. Modifying the system clock is accomplished using the clock divide bits (CD1:0) found in the PMR
special function register. This procedure is discussed in Section 5. The timer 1 input clock divide ratio is configurable using the T1M
(CKCON.4) and T1MH (CKMOD.4) register bits. Setting the T1MH bit to a logic 1 results in the system clock being used to clock timer
1. When T1MH is clear ( = 0), setting the T1M bit to a logic 1 provides the system clock divided by 4 input to timer 1. When both T1M
and T1MH are logic 0, the Timer 1 input clock is fixed at the oscillator frequency divided by 12. When using power-management mode,
setting either T1MH or T1M to a logic 1 results in the system clock (OSC/1024) being used as the input clock to timer 1. While, if both
bits are clear ( = 0) in power-management mode, the system clock divided by 3 (OSC/3072) are provided to timer 1. The following
table summarizes the relationship between the external crystal frequency and the timer 1 input clock for the various configurations.
____________________________________________________________________________________________ 114