Intel 80C196NU ユーザーズマニュアル

ページ / 471
8-8
8XC196NP, 80C196NU USER’S MANUAL
8.3.2.5
Multiprocessor Communications
Modes 2 and 3 are provided for multiprocessor communications. In mode 2, the serial port sets
the RI interrupt pending bit only when the ninth data bit is set. In mode 3, the serial port sets the
RI interrupt pending bit regardless of the value of the ninth bit. The ninth bit is always set in ad-
dress frames and always cleared in data frames. 
One way to use these modes for multiprocessor communication is to set the master processor to
mode 3 and the slave processors to mode 2. When the master processor wants to transmit a block
of data to one of several slaves, it sends out an address frame that identifies the target slave. Be-
cause the ninth bit is set, an address frame interrupts all slaves. Each slave examines the address
byte to check whether it is being addressed. The addressed slave switches to mode 3 to receive
the data frames, while the slaves that are not addressed remain in mode 2 and are not interrupted.
8.4
PROGRAMMING THE SERIAL PORT
To use the SIO port, you must configure the port pins to serve as special-function signals and set
up the SIO channel. 
8.4.1
Configuring the Serial Port Pins
Before you can use the serial port, you must configure the associated port pins to serve as special-
function signals. Table 8-1 on page 8-2 lists the pins associated with the serial port. Table 8-2 lists
the port configuration registers, and Chapter 7, “I/O Ports,” explains how to configure the pins.
8.4.2
Programming the Control Register
The SP_CON register (Figure 8-6) selects the communication mode and enables or disables the
receiver, parity checking, and nine-bit data transmissions. Selecting a new mode resets the serial
I/O port and aborts any transmission or reception in progress on the channel.
8.4.3
Programming the Baud Rate and Clock Source
The SP_BAUD register (Figure 8-7 on page 8-11) selects the clock input for the baud-rate gen-
erator and defines the baud rate for all serial I/O modes. This register acts as a control register
during write operations and as a down-counter monitor during read operations.
WARNING
Writing to the SP_BAUD register during a reception or transmission can 
corrupt the received or transmitted data. Before writing to SP_BAUD, check 
the SP_STATUS register to ensure that the reception or transmission is 
complete.