Preliminary W77E516
Mode 3
This mode is similar to Mode 2 in all respects, except that the baud rate is programmable. The user
must first initialize the Serial related SFR SCON before any communication can take place. This
involves selection of the Mode and baud rate. The Timer 1 should also be initialized if modes 1 and
3 are used. In all four modes, transmission is started by any instruction that uses SBUF as a
destination register. Reception is initiated in Mode 0 by the condition RI = 0 and REN = 1. This will
generate a clock on the TxD pin and shift in 8 bits on the RxD pin. Reception is initiated in the other
modes by the incoming start bit if REN = 1. The external device will start the communication by
transmitting the start bit.
Table 10.
SM1
Serial Ports Modes
SM0
MODE
TYPE
BAUD CLOCK
FRAME
SIZE
START
BIT
STOP
BIT
9TH BIT
FUNCTION
0
0
1
1
0
1
0
1
0
1
2
3
Synch.
Asynch.
Asynch.
Asynch.
4 or 12 T
CLKs
Timer 1 or 2
32 or 64 T
CLKs
8 bits
10 bits
11 bits
11 bits
No
1
1
1
No
1
1
1
None
None
0, 1
0, 1
Timer 1 or 2
Timer 1
Overflow
Timer 2 Overflow
(for Serial Port 0 only)
Write to
SBUF
1
0
1
梅16
TX START
TX CLOCK
STOP
TB8
Internal
Data Bus
D8
PARIN
START
LOAD
CLOCK
SOUT
梅2
SMOD=
(SMOD_1)
0
TXD
TCLK
TX SHIFT
TI
Transmit Shift Register
RCLK
0
1
梅16
SERIAL
CONTROLLER
RX CLOCK
RI
Serial Port
Interrupt
SAMPLE
1-TO-0
DETECTOR
RX
START
LOAD
SBUF
RX SHIFT
CLOCK
PAROUT
Read
SBUF
SBUF
RB8
RXD
BIT
DETECTOR
SIN
D8
Internal
Data
Bus
Receive Shift Register
Figure 23: Serial Port Mode 3
- 69 -
Publication Release Date: August 16, 2002
Revision A1