XC886/888CLM
Serial Interfaces
User’s Manual
12-8
V1.3, 2010-02
Serial Interfaces, V 1.0
12.1.3
UART Register Description
Both UART modules contain the two Special Function Registers (SFRs), SCON and
SBUF. SCON is the control register and SBUF is the data register. On reset, both SCON
and SBUF return 00
H
. The serial port control and status register is the SFR SCON. This
register contains not only the mode selection bits, but also the 9th data bit for transmit
and receive (TB8 and RB8) and the serial port interrupt bits (TI and RI).
SBUF is the receive and transmit buffer of the serial interface. Writing to SBUF loads the
transmit register and initiates transmission. This register is used for both transmit and
receive data. Transmit data is written to this location and receive data is read from this
location, but the two paths are independent.
Reading out SBUF accesses a physically separate receive register.
SBUF
Serial Data Buffer
Reset Value: 00
H
7
6
5
4
3
2
1
0
VAL
rwh
Field
Bits
Type Description
VAL
[7:0]
rwh
Serial Interface Buffer Register
SCON
Serial Channel Control Register
Reset Value: 00
H
7
6
5
4
3
2
1
0
SM0
SM1
SM2
REN
TB8
RB8
TI
RI
rw
rw
rw
rw
rw
rwh
rwh
rwh
Field
Bits
Type Description
RI
0
rwh
Receive Interrupt Flag
This is set by hardware at the end of the 8th bit on
mode 0, or at the half point of the stop bit in modes
1, 2, and 3. Must be cleared by software.
*