UMBC CMSC 391 -- Programming Microcontrollers  


Serial Port Control (SCON) Special Function Register<

Bit Symbol SCON Bit Function
7 SM0 Serial port mode bit 1. Set/cleared by program to select mode.
6 SM1 Serial port mode bit 1. Set/cleared by program to select mode.

SM0SM1 Mode Description
0 0 0 Shift register; baud = f/12
0 1 1 8-bit UART; baud = variable
1 0 2 9-bit UART; baud = f/32 or f/64
1 1 3 9-bit UART; baud = variable

5 SM2 Multiprocessor communications bit. Set/cleared by program to enable multiprocessor communications in modes 2 and 3. When set to 1 an interrupt is generated if bit 9 of the received data is a 1; no interrupt is generated if bit 9 is a 0. If set to 1 for mode 1, no interrupt will be generated unless a valid stop bit is received. Clear to 0 if mode 0 is in use.
4 REN Receive enable bit. Set to 1 to enable reception; cleared to 0 to disable reception.
3 TB8 Transmitted bit 8. Set/cleared by program in modes 2 and 3.
2 RB8 Received bit 8. Bit 8 of received data in modes 2 and 3; stop bit in mode1. Not used in mode 0.
1 TI Transmit Interrupt flag. Set to one at the end of bit 7 time in mode 0, and at the beginning of the stop bit for other modes. Must be cleared by the program.
0 RI Receive Interrupt flag. Set to one at the end of bit 7 time in mode 0, and halfway through the stop bit for other moves. Must be cleared by the program.

SCON is bit addressable as SCON.0 to SCON.7.
Direct Byte Address is 98h.


©2004, Gary L. Burt