
ML674001 Series/ML675001 Series User’s Manual
Chapter 17
SIO
17-11
17.3
Description of Operation
Settings in the SIOCON register specify the frame format: character length, number of stop bits, and parity.
Figure 17.2 gives the register settings for sample formats.
(1) 8 data bits, 1 stop bit, parity (LN = "0," TSTB = "1," PEN = "1")
STRAT D0
D1
D2
D3
D4
D5
D6
D7
P
STOP START
(2) 8 data bits, 1 stop bit, no parity (LN = "0," TSTB = "1," PEN = "0")
STRAT D0
D1
D2
D3
D4
D5
D6
D7
STOP START
(3) 8 data bits, 2 stop bits, parity (LN = "0," TSTB = "0," PEN = "1")
STRAT D0
D1
D2
D3
D4
D5
D6
D7
P
STOP STOP START
(4) 7 data bits, 1 stop bit, parity (LN = "1," TSTB = "1," PEN = "1")
STRAT D0
D1
D2
D3
D4
D5
D6
P
STOP START
Figure 17.2 Sample Frame Formats
17.3.1
Transmitting Data
Writing 8-bit data to the transmit buffer (SIOBUF) register starts a transmit operation. Note that the
interface does not transmit the top bit if the character length is 7 bits.
When the interface transfers the SIOBUF contents to the transmit shift register, it generates a transmitter
ready interrupt request, and sets the TRIRQ bit in the SIOSTA register to “1” to indicate that SIOBUF is
now empty, ready for the next write of transmit data to SIOBUF.
The interface then transmits the frame one bit at a time as specified by the SIOCON register settings: start
bit, seven or eight data bits, optional parity bit, and one or two stop bits.
17.3.2
Receiving Data
When the interface detects the start bit for a new frame, it begins latching the data bits into the receive shift
register as specified by the frame format in the SIOCON register.
When the interface detects a stop bit, it transfers the received data from the shift register to the receive
buffer (SIOBUF) register, signals any errors detected by writing “1” to the corresponding bits (PERR,
OERR, and FERR) in the SIOSTA register, sets the RVIRQ bit in the SIOSTA register to “1,” and
generates a receive ready interrupt request to indicate that the receive shift register is empty, ready to
receive the next frame.