Mode 3; Mode 2 And 3 Timings; Multiprocessor Communications - Intel 8XC196NT User Manual

Table of Contents

Advertisement

Stop
Start
7.3.2.3

Mode 3

Mode 3 is the asynchronous, ninth-bit mode. The data frame for this mode is identical to that of
mode 2. Mode 3 differs from mode 2 during transmissions in that parity can be enabled, in which
case the ninth bit becomes the parity bit. When parity is disabled, data bits 0–7 are written to the
serial port transmit buffer, and the ninth data bit is written to bit 4 (TB8) bit in the SP_CON reg-
ister. In mode 3, a reception always sets the RI interrupt pending bit, regardless of the state of the
ninth bit. If parity is disabled, the SP_STATUS register bit 7 (RB8) contains the ninth data bit. If
parity is enabled, then bit 7 (RB8) is the received parity error (RPE) flag.
7.3.2.4

Mode 2 and 3 Timings

Operation in modes 2 and 3 is similar to mode 1 operation. The only difference is that the data
consists of 9 bits, so 11-bit packages are transmitted and received. During a reception, the RI flag
and the RI interrupt pending bit are set just after the end of the stop bit. During a transmission,
the TI flag and the TI interrupt pending bit are set at the beginning of the stop bit. The ninth bit
can be used for parity or multiprocessor communications.
7.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.
D2
D0
D1
D3
8 Bits of Data
11-Bit Frame
Figure 7-5. Serial Port Frames in Mode 2 and 3
D4
D5
D6
D7
Programmable 9th Bit
SERIAL I/O (SIO) PORT
Stop
D8
A0111-01
7-7

Advertisement

Table of Contents
loading

Table of Contents