English
Language : 

W78IRD2 Datasheet, PDF (38/76 Pages) Winbond – 8-BIT MICROCONTROLLER
W78IRD2
10. ENHANCED FULL DUPLEX SERIAL PORT
The W78IRD2 serial port is a full-duplex port, and the W78IRD2 provides additional features such as
frame-error detection and automatic address recognition. The serial port runs in one of four operating
modes.
Serial Ports Modes
SM1 SM0 MODE TYPE
BAUD CLOCK
FRAME START STOP 9TH BIT
SIZE
BIT
BIT FUNCTION
0
0
0
Synch.
12 TCLKS
8 bits
No
No
None
0
1
1
Asynch.
Timer 1 or 2
10 bits
1
1
None
1
0
2
Asynch. 32 or 64 TCLKS 11 bits
1
1
0, 1
1
1
3
Asynch.
Timer 1 or 2
11 bits
1
1
0, 1
In synchronous mode (mode 0), the W78IRD2 generates the clock and operates in a half-duplex
mode. In asynchronous modes (modes 1 – 3), full-duplex operation is available so that the serial port
can simultaneously transmit and receive data. In any mode, register SBUF functions as both the
transmit register and the receive buffer. Any write to SBUF writes to the transmit register, while any
read from SBUF reads from the receive buffer. The rest of this section discusses each operating mode
and then discusses frame-error detection and automatic address recognition.
10.1 MODE 0
Mode 0 is a half-duplex, synchronous mode. RxD transmits and receives serial data, and TxD
transmits the shift clock. The TxD clock is provided by the W78IRD2. Eight bits are transmitted or
received per frame, LSB first. The baud rate is fixed at 1/12 of the oscillator frequency. The functional
block diagram is shown below.
osc
Write to
SBUF
Internal
Data Bus
PARIN SOUT
LOAD
CLOCK
RXD
P3.0 Alternate
Output Function
12
TX START TX SHIFT
Transmit Shift Register
TX CLOCK
TI
RI
REN
RXD
P3.0 Alternate
Iutput function
SERIAL
RI
CONTROLLE
RX
CLOCK
RX
START
SHIFT
CLOCK
LOAD SBUF
RX SHIFT
CLOCK
PAROUT
SIN
Serial Port Interrupt
TXD
P3.1 Alternate
Output function
SBUF
Read SBUF
SBUF
Internal
Data Bus
Receive Shift Register
Figure 10-1 Serial Port Mode 0
- 38 -