23.2. Operational Modes
UART1 provides standard asynchronous, full duplex communication. The UART mode (8-bit or 9-bit) is selected by
the S1MODE bit (SCON1.7). Typical UART connection options are shown below.
23.2.1. 8-Bit UART
8-Bit UART mode uses a total of 10 bits per data byte: one start bit, eight data bits (LSB first), and one stop bit. Data
are transmitted LSB first from the TX1 pin and received at the RX1 pin. On receive, the eight data bits are stored in
SBUF1 and the stop bit goes into RB81 (SCON1.2).
Data transmission begins when software writes a data byte to the SBUF1 register. The TI1 Transmit Interrupt Flag
(SCON1.1) is set at the end of the transmission (the beginning of the stop-bit time). Data reception can begin any
time after the REN1 Receive Enable bit (SCON1.4) is set to logic 1. After the stop bit is received, the data byte will
be loaded into the SBUF1 receive register if the following conditions are met: RI1 must be logic 0, and if MCE1 is
logic 1, the stop bit must be logic 1. In the event of a receive data overrun, the first received 8 bits are latched into the
SBUF1 receive register and the following overrun data bits are lost.
If these conditions are met, the eight bits of data is stored in SBUF1, the stop bit is stored in RB81 and the RI1 flag is
set. If these conditions are not met, SBUF1 and RB81 will not be loaded and the RI1 flag will not be set. An interrupt
will occur if enabled when either TI1 or RI1 is set.
MARK
START
BIT
SPACE
BIT TIMES
BIT SAMPLING
Figure 23.3. UART Interconnect Diagram
RS-232
TX
MCU
RX
Figure 23.4. 8-Bit UART Timing Diagram
D0
D1
D2
D3
C8051F120/1/2/3/4/5/6/7
TX
RS-232
C8051Fxxx
LEVEL
RX
XLTR
OR
TX
C8051Fxxx
RX
D4
D5
D6
Rev. 1.2
STOP
D7
BIT
277
Need help?
Do you have a question about the C8051F120 and is the answer not in the manual?