Receiving Serial Data
Reception is initiated by a 1-0 transition - a start bit
- data is sampled and shifted in automatically
- on the stop bit, the 8 data bits are loaded into SBUF
- same address, but different register and sending SBUF
- RI (receive interrupt) set when SBUF is loaded
- indicates a character is ready
- next character can start entering before SBUF is read
- must read SBUF before next character arrives
- RI can be polled, or used to interrupt
- must be reset in the software