English
Language : 

C508_01 Datasheet, PDF (168/267 Pages) Infineon Technologies AG – 8-Bit CMOS Microcontroller
C508
On-Chip Peripheral Components
In all four modes, transmission is initiated by any instruction that uses SBUF as a
destination register. Reception is initiated in Mode 0 by the condition RI = 0 and REN = 1.
Reception is initiated in the other modes by the incoming start bit if REN = 1.
The serial interface also provides interrupt requests when transmission or reception of a
frame is completed. The corresponding interrupt request flags are TI or RI, respectively.
See Chapter 7 for more details about the interrupt structure. The interrupt request flags,
TI and RI, can also be used for polling the serial interface, if the serial interrupt is not to
be used (that is, serial interrupt is not enabled).
6.4.1 Multiprocessor Communication
Modes 2 and 3 have a special provision for multiprocessor communications. In these
modes, 9 data bits are received. The 9th bit goes into RB8. Then comes a stop bit. The
port can be programmed such that when the stop bit is received, the serial port interrupt
will be activated only if RB8 = 1. This feature is enabled by setting bit SM2 in SCON. One
use of this feature in multiprocessor systems is described here.
When the master processor wants to transmit a block of data to one of several slaves, it
first sends out an address byte which identifies the target slave. An address byte differs
from a data byte in that the 9th bit is ‘1’ in an address byte and ‘0’ in a data byte. With
SM2 = 1, no slave will be interrupted by a data byte. An address byte, however, will
interrupt all slaves, so that each slave can examine the received byte and see if it is being
addressed. The addressed slave will clear its SM2 bit and prepare to receive the data
bytes that will be coming. The slaves which were not being addressed keep their SM2s
set and ignore the incoming data bytes.
SM2 has no effect in Mode 0. In Mode 1, it can be used to check the validity of the stop
bit. In a Mode 1 reception, if SM2 = 1, the receive interrupt will not be activated unless a
valid stop bit is received.
6.4.2 Serial Port Registers
The serial port control and status register is the special function register 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 serial interface. Writing to SBUF loads the
transmit register and initiates transmission. Reading out SBUF accesses a physically
separate receive register.
User’s Manual
6-103
2001-05