121
Table 12-2 describes the serial port status registers.
Writing to the status register clears the transmit interrupt request FF, but has no other effect.
Bit 7—Receiver ready. This bit is set when a byte is transferred from the receiver shift regis-
ter to the receiver data register. The bit is cleared when the receiver data register is read.
The transition from "0" to "1" sets the receiver interrupt request flip-flop.
Bit 6—Address bit or 9th (8th) bit. This bit is set if the character in the receiver data register
has a 9th (8th) bit. This bit is cleared and should be checked before reading a data register
since a new data value with a new address bit may be loaded immediately when the data
register is read.
Bit 5—This bit is set if the receiver is overrun. This happens if the shift register and the data reg-
ister are full and a start bit is detected. This bit is cleared when the receiver data register is read.
Bit 3—Transmitter data buffer full. This bit is set when the transmit data register is full, that
is, a byte is written to the serial port data register. It is cleared when a byte is transferred to
the transmitter shift register or a write operation is performed to the serial port status regis-
ter. This bit will request an interrupt on the transition from 1 to 0 if interrupts are enabled.
Bit 2—Transmitter busy bit. This bit is set if the transmitter shift register is busy sending
data. It is set on the falling edge of the start bit, which is also the clock edge that transfers
data from the transmitter data register to the transmitter shift register. The transmitter busy
bit is cleared at the end of the stop bit of the character sent. This bit will cause an interrupt
to be latched when it goes from busy to not busy status after the last character has been
sent (there are no more data in the transmitter data register).
Bits 0,1,4—Always read as zero.
Table 12-1. Serial Port Registers
Register
Address xx = 00, 01, 10, 11
for A, B, C, D
Mnemonic x = A, B, C, D
Data Register
11xx0000
SxDR
Alternate Data Register to
Send 9th (8th) Address Bit
11xx0001
SxAR
Long Stop Register*
* Extra stop bit is supported in revisions A–C of the Rabbit 2000 chip via this register.
11xx0010
SxLR
Status Register (read, write
to clear transmit IRQ)
11xx0011
SxSR
Control Register (write only)
11xx0100
SxCR
Table 12-2. Serial Port Status Registers (adr = 11xx0011, xx = A,B,C,D)
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1,0
Receiver
ready (there
is a byte in
the receive
data register)
9th bit
received
Receive
buffer
overrun
0
Transmitter
data
register is
full
Transmitter
is sending a
byte
0,0