English
Language : 

DS89C420-QCL Datasheet, PDF (112/139 Pages) Maxim Integrated Products – Ultra-High-Speed Flash Microcontroller User’s Guide
Ultra-High-Speed Flash
Microcontroller User’s Guide
MODE 1
This mode provides standard full-duplex asynchronous communication. A total of 10 bits are transmitted including 1 start bit, 8 data
bits, and 1 stop bit. The received stop bit is stored in bit location RB8 of the relevant SCON register.
In mode 1, the baud rate is a function of timer overflow. This makes the baud rate programmable by the user. One difference that exists
between the two UARTs, with respect to mode 1 configuration, is that serial port 1 can use only timer 1, whereas serial port 0 can use
either timer 1 or 2 to generate baud rates. If both serial ports use the same timer, they run at the same baud rate, or one can run twice
as fast as the other (when baud-rate doubler bits, PCON.7 and WDCON.7, are configured differently). If the two UARTs use different
timers, the baud-rate configurations, in relation to one another, are not as restrictive. Baud rates are discussed in more detail later. Mode
1 operation is identical to the standard 80C32 when timers 1 or 2 use the default oscillator divide-by-12 as an input clock.
MODE 2
This mode is an asynchronous mode that transmits a total of 11 bits. These include 1 start bit, 9 data bits (the ninth data bit being pro-
grammable), and 1 stop bit. The ninth bit is determined by the value in TB8 (SCON0.3 or SCON1.3) for transmission. When the ninth
bit is received, it is stored in RB8 (SCON0.2 or SCON1.2). The ninth bit can be a parity value by moving the P bit (PSW.0) to TB8.
When not using the power-management mode, the baud rate for mode 2 is a function only of the oscillator frequency. It is either the
oscillator input divided by 32 or 64 as programmed by the SMOD doubler bit for the associated UART. The SMOD_0 baud-rate dou-
bler bit for serial port 0 is located at PCON.7, and the SMOD_1 baud-rate doubler bit for serial port 1 is located at WDCON.7. Mode 2
operation is identical to the standard 80C32.
MODE 3
This mode has the same functionality as mode 2, but generates baud rates like mode 1. That is, this mode transmits 11 bits, but gen-
erates baud rates through the timers. Like mode 1, either timer 1 or 2 can be used for serial port 0 and timer 1 can be used for serial
port 1. Mode 3 operation is identical to the standard 80C32 when timers 1 or 2 use the default oscillator divide-by-12 as an input clock.
SERIAL PORT INITIALIZATION
In order to use the UART function(s), the serial port must be initialized. This involves selecting the mode and time base, then initializ-
ing the baud-rate generator, if necessary. Serial communication is then available. Once the baud-rate generator is running, the UART
can receive data.
In mode 0, the high-speed microcontroller provides the clock. Serial reception is initiated by setting the RI bit to a logic 0 and REN to
a logic 1. This generates a clock on the TXD pin and a shift in the 8 bits on the RXD pin. In the other modes, setting the REN bit to a
logic 1 allows serial reception, but the external device must actually initiate it by sending a start bit. In any mode, serial transmission
is initiated by writing to either the SBUF0 or SBUF1 location.
Most of the serial port controls are provided by the SCON0 and SCON1 registers. For convenience, the Table 12-2 is provided, which
summarizes the SFRs controlling serial port operation. Detailed bit descriptions can be found in Section 4.
____________________________________________________________________________________________ 112