English
Language : 

W78ERD2 Datasheet, PDF (39/72 Pages) Winbond – 8-BIT MICROCONTROLLER
W78ERD2
osc
TB8
Internal
2
Write to Data Bus
SBUF
SMOD = 0 1
16
16
SAMPLE
1-TO-0
DETECTOR
TX START
TX CLOCK
TX
SHIFT
TI
SERIAL
CONTROLLER RI
RX CLOCK
RX START
LOAD
SBUF
RX SHIFT
RXD
BIT
DETECTOR
D8
STOP
PARIN
START
LOAD
SOUT
CLOCK
Transmit Shift Register
TXD
Serial Port
Interrupt
CLOCK
PAROUT
SIN
D8
SBUF
RB8
Receive Shift Register
Read
SBUF
Internal
Data
Bus
Serial Port Mode 2
If the first bit detected after the falling edge of RxD pin, is not 0, then this indicates an invalid start bit,
and the reception is immediately aborted. The serial port again looks for a falling edge in the RxD line.
If a valid start bit is detected, then the rest of the bits are also detected and shifted into the SBUF.
After shifting in 9 data bits, there is one more shift to do, after which the SBUF and RB8 are loaded
and RI is set. However certain conditions must be met before the loading and setting of RI can be
done.
1. RI must be 0 and
2. Either SM2 = 0, or the received stop bit = 1.
If these conditions are met, then the stop bit goes to RB8, the 8 data bits go into SBUF and RI is set.
Otherwise the received frame may be lost. After the middle of the stop bit, the receiver goes back to
looking for a 1-to-0 transition on the RxD pin.
10.4 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.
- 39 -
Publication Release Date: April 20, 2005
Revision A4