![](http://datasheet.mmic.net.cn/30000/MB89P475P-SH-101_datasheet_2367370/MB89P475P-SH-101_329.png)
313
CHAPTER 14 UART/SIO
Table 14.4-2 Serial mode control register 2 (SMC12/22) bits
Bit
Function
Bit 7
RERC:
Receiving every flag
clear bit
Writing "0" to this bit clears all error flag(PER, OVE and FER) in the SSD1/2
register.This bit is always "1" when read.
Bit 6
RXE:
Receiving operation
enable bit
This bit enables reception of serial data. The receiving operation is stopped by writing
"0" to this bit after receiving the current serial data, and disabled thereafter.
Bit 5
TXE :
Transmission
operation enable bit
This bit enables transmission of serial data. The transmission operation is stopped by
writing "0" to this bit after transmitting the current serial data, then disabled thereafter.
Bit 4
BRGE:
Baud rate generator
start bit
This bit starts the baud rate generator
Bit 3
TXOE:
Serial data output
enable bit
The P21/SO1, P26/SO2 pin functions as a general-purpose port (P21, P26) when this
bit is set to "0" and as the serial data output pn (SO1, SO2) when set to "1".
Reference:
The pin functions as the (SO1, SO2) pin when serial data output is enabled (TXOE =
"1"), regardless of the state of the general-purpose port P21, P26.
Bit 2
SCKE:
Serial clock output
enable bit
This bit contorls shift clock input and output.
The P20/SCK1, P27/SCK2 pin function as the shift clcok input pin when this bit is set
to "0" and as the shift clock output pin when set to "1".
Note:
Set the P20/SCK1, P27/SCK2 pin as an input port when using this pin as the shift
clock input. Also, selects external shift clock operation in the shift clock selection bits
(SMC11/SMC21: CLK2, CLK1, CLK0 = "100B")
When using this pin as internal shift clock output (SCKE = "1"), select internal shift
clock operation (SMC11/SMC21: CLK2, CLK1, CLK0 = other than "100B")
Reference:
The pin functions as the SCK1, SCK2 output pin when shift clock is enabled (SCKE =
"1") regardless of the state of the general-purpose port (P20, P27).
Set to shift clock input operation (SCKE = "0") when using this pin as a general-
purpose port (P20, P27).
Bit 1
RIE:
Receiving interrupt
enable bit
This bit enables receiving interrupts. If the RDRF bit is "1" or if any error flag is "1", a
receiving interrupt is immediately generated once receiving interrupts are enabled.
Bit 0
TIE:
Transmission
interrupt enable bit
This bit enables transmission interrupts. If the TDRE bit is "1", a transmission interrupt
is immediately generated once transmission interrupts are enabled.