Explain SCON register of 8051.
1 Answer
  • Serial port control and status register is the special function register SCON.
  • This register contain not only the mode selection bits but also the 9th data bit for transmit and receive (TB8 and RB8) and the serial part interrupt bits (TI and RI)

enter image description here

SCON (Serial Port Control Register)

SMO – Serial port mode 0 shift register

SM1 – serial port mode 1 8 bit UAR + variable

SM2 – enable multiprocessor communication in mode 2/3

REN – set/ clear by software to enable/disable reception

TB8 – the 9th bit that will be transmitted in mode 2/3 set/clear by software.

RB8 – in mode 2/3 it is the 9th bit that was received in mode 1 if SM2 =0, RB8 is the stop bit that was received in mode it is not used.

TI – transmit interrupt flag set by hardware at the end of 8 bit time in mode 0 at the beginning of the stop bit in the other mode it must be cleared by software

RI – receive interrupt flag set by hardware and must be cleared by software.

SMO SM1 Mode Description Baud Rate
0 0 Mode 0 Shift register (fosc/12)
0 1 Mode 1 9 bit UART variable
1 0 Mode 2 9 bit UART (fosc/64) or (fosc/32)
1 1 Mode 3 9 bit UART variable
Please log in to add an answer.