![](http://datasheet.mmic.net.cn/30000/M32176F3TFP_datasheet_2359466/M32176F3TFP_414.png)
12
12-16
Serial I/O
12.2 Serial I/O Related Registers
32176 Group User’s Manual (Rev.1.01)
The SIO Transmit/Receive Mode Registers consist of bits to set the serial I/O operation mode, data format and
the functions used during communication.
The SIO Transmit/Receive Mode Registers must always be set before the serial I/O starts operating. To change
register settings after the serial I/O starts sending or receiving data, first confirm that transmit and receive
operations have finished and then disable transmit/receive operations (by clearing the SIO Transmit Control
Register transmit enable bit and SIO Receive Control Register receive enable bit to "0") before making changes.
(1) SMOD (Serial I/O Mode Select) bits (Bits 8–10)
These bits select the operation mode of serial I/O.
(2) CKS (Internal/External Clock Select) bit (Bit 11)
This bit is effective when CSIO mode is selected. Setting this bit has no effect when UART mode is selected,
in which case the serial I/O is clocked by the internal clock.
(3) STB (Stop Bit Length Select) bit (Bit 12)
This bit is effective during UART mode. Use this bit to select the stop bit length that indicates the end of data
to transmit. Setting this bit to "0" selects one stop bit, and setting this bit to "1" selects two stop bits.
During clock-synchronous mode, the content of this bit has no effect.
(4) PSEL (Odd/Even Parity Select) bit (Bit 13)
This bit is effective during UART mode. When parity is enabled (bit 14 = "1"), use this bit to select the parity
attribute (whether odd or even). Setting this bit to "0" selects an odd parity, and setting this bit to "1" selects
an even parity.
When parity is disabled (bit 14 = "0") or during clock-synchronous mode, the content of this bit has no effect.
(5) PEN (Parity Enable) bit (Bit 14)
This bit is effective during UART mode. When this bit is set to "1", a parity bit is added immediately after the
data bits of the transmit data, and the received data is checked for parity.
The parity bit added to the transmit data is automatically determined to be "0" or "1" so that the attribute (odd/
even) derived by adding the number of 1’s in data bits and the content of the parity bit agrees with one that
was selected with the odd/even parity select bit (bit 13).
Figure 12.2.6 shows an example of a data format when parity is enabled.
(6) SEN (Sleep Select) bit (Bit 15)
This bit is effective during UART mode. If the sleep function is enabled by setting this bit to "1", data is latched
into the UART Receive Buffer Register only when the most significant bit (MSB) of the received data is "1".