Receiving a Character

Receiving a Character

Receiving is much like sending - here we use the top two registers, the RCSR (receiver control and status register) and RBUF. The RCSR looks like the following:

Interrupt-Driven Reception

Again like the sender, the RCSR has a bit that tells it whether we want to use polled I/O or interrupt-driven I/O. This is the I bit above. If we set this bit to 1, the receiver will interrupt the CPU each time a character has been received and is ready for reading in the RBUF.

Polled Reception

If we would like to use polled-I/O instead, we set the I bit to 0, and then poll the D bit. When a character is ready to be read at the RBUF, this bit will have a 1 in it, otherwise it be 0.

1