Intel 8XC196NP, 80C196NU, Microcontroller manual Spstatus, RPE/RB8 TXE

Models: Microcontroller 80C196NU 8XC196NP

1 471
Download 471 pages 22.3 Kb
Page 181
Image 181

8XC196NP, 80C196NU USER’S MANUAL

SP_STATUS

Address:

1FB9H

 

Reset State:

0BH

The serial port status (SP_STATUS) register contains bits that indicate the status of the serial port.

7

RPE/RB8

RI

TI

FE

 

 

 

 

0

TXE

OE

 

 

 

 

Bit

Bit

Function

Number

Mnemonic

 

 

 

 

7

RPE/RB8

Received Parity Error/Received Bit 8

 

 

RPE is set if parity is disabled (SP_CON.2 = 0) and the ninth data bit

 

 

received is high.

 

 

RB8 is set if parity is enabled (SP_CON.2 = 1) and a parity error

 

 

occurred.

 

 

Reading SP_STATUS clears this bit.

 

 

 

6

RI

Receive Interrupt

 

 

This bit is set when the last data bit is sampled. Reading SP_STATUS

 

 

clears this bit.

 

 

This bit need not be clear for the serial port to receive data.

 

 

 

5

TI

Transmit Interrupt

 

 

This bit is set at the beginning of the stop bit transmission. Reading

 

 

SP_STATUS clears this bit.

 

 

 

4

FE

Framing Error

 

 

This bit is set if a stop bit is not found within the appropriate period of

 

 

time. Reading SP_STATUS clears this bit.

 

 

 

3

TXE

SBUF_TX Empty

 

 

This bit is set if the transmit buffer is empty and ready to accept up to two

 

 

bytes. It is cleared when a byte is written to SBUF_TX.

 

 

 

2

OE

Overrun Error

 

 

This bit is set if data in the receive shift register is loaded into SBUF_RX

 

 

before the previous bit is read. Reading SP_STATUS clears this bit.

 

 

 

1:0

Reserved. These bits are undefined.

 

 

 

Figure 8-8. Serial Port Status (SP_STATUS) Register

The receiver checks for a valid stop bit. Unless a stop bit is found within the appropriate time, the framing error (FE) bit in the SP_STATUS register is set. When the stop bit is detected, the data in the receive shift register is loaded into SBUF_RX and the receive interrupt (RI) flag is set. If this happens before the previous byte in SBUF_RX is read, the overrun error (OE) bit is set. SBUF_RX always contains the latest byte received; it is never a combination of the last two bytes.

8-14

Page 181
Image 181
Intel 8XC196NP, 80C196NU, Microcontroller manual Spstatus, RPE/RB8 TXE