English
Language : 

DS80C320-MCG Datasheet, PDF (139/175 Pages) Dallas Semiconductor – High-Speed Microcontroller User Guide
High-Speed Microcontroller User’s Guide
MODE 2
This mode is an asynchronous mode that transmits a total of 11 bits. These include 1 start bit, 8 data bits,
a programmable ninth bit, 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.
The baud rate for Mode 2 is a function of the oscillator frequency. It is either the oscillator input divided
by 32 or 64 as programmed by the SMOD bit in the PCON register. 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 generates baud rates via 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 divide by 12 of the oscillator.
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 initializing 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 will generate a clock on the TXD pin and shift in the 8 bits
on the RXD pin. In the other modes, setting the REN bit to a logic 1 will allow serial reception. 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, these
are provided below. In addition, other control bits that influence the Serial Port operation are also
summarized below.
SERIAL I/O MODES
MODE SYNCH/ASYNCH BAUD CLOCK† DATA BITS
0
Synch
4 or 12 tCLK
8
1
Asynch
Timer 1 or 2*
8
2
Asynch
32 or 64 tCLK
9
3
Asynch
Timer 1 or 2*
9
*Timer 2 available for Serial Port 0 only.
†The use of PMM1 or PMM2 will affect the baud clock.
START/STOP
None
1 start, 1 stop
1 start, 1 stop
1 start, 1 stop
9TH BIT FUNCTION
None
None
0, 1, parity
0, 1, parity
139 of 175