English
Language : 

C508_01 Datasheet, PDF (167/267 Pages) Infineon Technologies AG – 8-Bit CMOS Microcontroller
C508
On-Chip Peripheral Components
6.4
Serial Interface
The serial port is a full duplex port capable of simultaneous transmit and receive
functions. It is also receive-buffered; it can commence reception of a second byte before
a previously-received byte has been read from the receive register. (However, if the first
byte still has not been read before reception of the second byte is complete, one of the
bytes will be lost). The serial port receive and transmit registers are both accessed at
special function register SBUF. Writing to SBUF loads the transmit register, and reading
SBUF accesses a physically separate receive register.
The serial port can operate in 4 modes (one synchronous mode, three asynchronous
modes). The baudrate clock for the serial port is derived from the oscillator frequency
(Modes 0 and 2) or generated either by Timer 1 or a dedicated baudrate generator
(Modes 1 and 3).
Mode 0, Shift Register (Synchronous) Mode:
Serial data enters and exits through RxD. TxD outputs the shift clock. Eight data bits are
transmitted/received with the Least Significant Bit (LSB) first. The baudrate is fixed at 1/
3 of the oscillator frequency (see Chapter 6.4.4 for more detailed information).
Mode 1, 8-Bit USART, Variable Baudrate:
Ten bits are transmitted through TxD or received through RxD: a start bit (0), 8 data bits
(LSB first), and a stop bit (1). On receive, the stop bit goes into RB8 in special function
register SCON. The baudrate in Mode 1 is variable (see Chapter 6.4.5 for more detailed
information).
Mode 2, 9-Bit USART, Fixed Baudrate:
Eleven bits are transmitted through TxD or received through RxD: a start bit (0), 8 data
bits (LSB first), a programmable 9th bit, and a stop bit (1). On transmit, the 9th data bit
(TB8 in SCON) can be assigned to the value of ‘0’ or ‘1’. Alternatively, the parity bit (P,
in the PSW) could be moved into TB8 an example. On receive, the 9th data bit goes into
RB8 in special function register SCON, while the stop bit is ignored. The baudrate is
programmable to either 1/8 or 1/16 of the oscillator frequency (see Chapter 6.4.6 for
more detailed information).
Mode 3, 9-Bit USART, Variable Baudrate:
Eleven bits are transmitted (through TxD) or received (through RxD): a start bit (0),
8 data bits (LSB first), a programmable 9th data bit, and a stop bit (1). In fact, Mode 3 is
the same as Mode 2 in all respects except the baudrate. The baudrate in Mode 3 is
variable (see Chapter 6.4.6 for more detailed information).
User’s Manual
6-102
2001-05