P8XC557E4 NXP Semiconductors, P8XC557E4 Datasheet - Page 29

The P80C557E4/P83C557E4/P89C557E4 (hereafter generically referred to as P8xC557E4) single-chip 8-bit microcontroller is manufactured in an advanced CMOS process and is a derivative of the 80C51 microcontroller family

P8XC557E4

Manufacturer Part Number
P8XC557E4
Description
The P80C557E4/P83C557E4/P89C557E4 (hereafter generically referred to as P8xC557E4) single-chip 8-bit microcontroller is manufactured in an advanced CMOS process and is a derivative of the 80C51 microcontroller family
Manufacturer
NXP Semiconductors
Datasheet
Philips Semiconductors
6.9 Serial I/O
The P8xC557E4 is equipped with two independent serial ports:
SIO0 and SI01. SIO0 is the full duplex UART port, identical to the
PCB80C51 serial port. SIO1 is an I
byte oriented master and slave functions.
6.9.1
SIO 0 is a full duplex serial I/O port – it can transmit and receive
simultaneously. This serial port is also receive-buffered. It can
commence reception of a second byte before the previously
received byte has been read from the receive register. If, however,
the first byte has still not been read by the time reception of the
second byte is complete, one of the bytes will be lost. The SIO0
receive and transmit registers are both accessed via the S0BUF
special function register. Writing to S0BUF loads the transmit
register, and reading S0BUF accesses to a physically separate
receive register. SIO0 can operate in 4 modes:
Table 22. Description of S0CON bits
1999 Mar 02
Mode 0:
Mode 1:
Single-chip 8-bit microcontroller
SYMBOL
SM0
SM1
SM2
REN
RB8
TB8
RI
TI
SIO0 (UART)
S0CON (98H)
Serial data is transmitted and received through RXD.
TXD outputs the shift clock. 8 data bits are
transmitted/received (LSB first). The baud rate is
fixed at 1/12 of the oscillator frequency. A write into
S0CON should be avoided during a transmission to
avoid spikes on RXD/TXD.
10 bits are transmitted via TXD or received through
RXD: a start bit (0), 8 data bits (LSB first), and a
stop bit(1). On receive, the stop bit is put into RB8
(S0CON special function register). The baud rate is
variable.
S0CON.7
S0CON.6
S0CON.5
S0CON.4
S0CON.3
S0CON.2
S0CON.1
S0CON.0
BIT
SM0
2
This bit is used to select the serial port mode. See Table 23.
This bit is used to select the serial port mode. See Table 23.
Enables the multiprocessor communication feature in modes 2 and 3. In mode 2 or 3, if SM2 is set to 1, then
RI will not be activated if the received 9th data bit (RB8) is 0. In mode 1, if SM2 = 1, then RI will not be activated
if a valid stop bit was not received. In mode 0, SM2 should be 0.
Enables serial reception. Set by software to enable reception. Clear by software to disable reception.
The 9th data bit that will be transmitted in modes 2 and 3. Set or clear by software as desired.
In modes 2 and 3, RB8 is the 9th data bit that was received. In mode 1, if SM2 = 0, RB8 is the stop bit that was
received. In mode 0, RB8 is not used.
The transmit interrupt flag. Set by hardware at the end of the 8th bit time in mode 0, or at the beginning of the
stop bit in the other modes, in any serial transmission. Must be cleared by software.
The receive interrupt flag. Set by hardware at the end of the 8th bit time in mode 0, or halfway through the stop
bit time in the other modes, in any serial reception (except see SM2). Must be cleared by software.
C-bus serial I/O interface with
7
SM1
6
Figure 28. Serial port control (S0CON) register.
SM2
5
29
REN
P83C557E4/P80C557E4/P89C557E4
4
In all four modes, transmission is initiated by any instruction that
writes to the S0BUF function register. Reception is initiated in Mode
0 when RI = 0 and REN = 1. In the other three modes, reception is
initiated by the incoming start bit provided that REN = 1.
Modes 2 and 3 are provided for multiprocessor communications. In
these modes, 9 data bits are received with the 9th bit written to RB8.
The 9th bit is followed by the stop bit. The port can be programmed
so that with receiving the stop bit, the serial port interrupt will be
activated if, and only if RB8 = 1.
This feature is enabled by setting bit SM2 in S0CON. This feature
may be used in multiprocessor systems.
For more information about how to use the UART in combination
with the registers S0CON, PCON, IEN0, S0BUF and Timer register
refer to the 80C51 Data Handbook IC20.
Mode 2:
Mode 3:
FUNCTION
TB8
3
11 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). On
transmit, the 9th data bit (TB8 in S0CON) can be
assigned the value of 0 or 1. With nominal software,
TB8 can be the parity bit (P in PSW). During a
receive, the 9th data bit is stored in RB8 (S0CON),
and the stop bit is ignored. The baud rate is
programmable to either 1/32 or 1/64 of the oscillator
frequency.
11 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). Mode
3 is the same as Mode 2 except the baud rate which
is variable in Mode 3.
RB8
2
TI
1
Product specification
RI
0

Related parts for P8XC557E4