Registers, Ee figure 107) – Rainbow Electronics AT89C5132 User Manual
Page 116
116
AT8xC5132
4173A–8051–08/02
Registers
Table 107. SCON Register
SCON (S:98h) – Serial Control Register
Reset Value = 0000 0000b
7
6
5
4
3
2
1
0
FE/SM0
OVR/SM1
SM2
REN
TB8
RB8
TI RI
Bit
Number
Bit
Mnemonic
Description
7
FE
Framing Error Bit
To select this function, set SMOD0 bit in PCON register.
Set by hardware to indicate an invalid stop bit.
Must be cleared by software.
SM0
Serial Port Mode Bit 0
Refer to Table 105 for mode selection.
6
SM1
Serial Port Mode Bit 1
Refer to Table 105 for mode selection.
5
SM2
Serial Port Mode Bit 2
Set to enable the multiprocessor communication and automatic address
recognition features.
Clear to disable the multiprocessor communication and automatic address
recognition features.
4
REN
Receiver Enable Bit
Set to enable reception.
Clear to disable reception.
3
TB8
Transmit Bit 8
Modes 0 and 1: Not used.
Modes 2 and 3: Software writes the ninth data bit to be transmitted to TB8.
2
RB8
Receiver Bit 8
Mode 0: Not used.
Mode 1 (SM2 cleared): Set or cleared by hardware to reflect the stop bit
received.
Modes 2 and 3 (SM2 set): Set or cleared by hardware to reflect the ninth bit
received.
1
TI
Transmit Interrupt Flag
Set by the transmitter after the last data bit is transmitted.
Must be cleared by software.
0
RI
Receive Interrupt Flag
Set by the receiver after the stop bit of a frame has been received.
Must be cleared by software.