Serial communication register in the 8051
SBUF:
SBUF is the serial buffer register use to sore the data during the transmission and the reception of the data.
SCON:
(Serial Port Control Register)
This register use for the mode selection, serial port interrupts, and for the 9th bit of the transmission and reception.
SMO – Serial port mode 0 shift register
SM1 – serial port mode 1 8 bit UAR + variable
SM2 – enable multiprocessor communication in mode 2/3.only set this pin if in the case you are dealing with the environment of the microprocessor.
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.
PCON:
It is use to control the power and the baud rate of the micro controller 8051.
1) SMOD is set to 1 if you want to double the baud rate else kept it 0
2)GF1 , GF0 is user define flag you can use it as per programming requirements.
3)pd is set to enable the power down mode in this case the internal clock and peripheral clock is kept inactive to save the power. It can be off by resetting the micro controller again.
4)last bit enable Idle mode. CPU clock turned off whereas internal peripheral module such as timer, serial port, interrupts works normally. Interrupt and H/W reset can cancel this mode.
SBUF:
SBUF is the serial buffer register use to sore the data during the transmission and the reception of the data.
SCON:
(Serial Port Control Register)
This register use for the mode selection, serial port interrupts, and for the 9th bit of the transmission and reception.
SMO – Serial port mode 0 shift register
SM1 – serial port mode 1 8 bit UAR + variable
SM2 – enable multiprocessor communication in mode 2/3.only set this pin if in the case you are dealing with the environment of the microprocessor.
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.
PCON:
It is use to control the power and the baud rate of the micro controller 8051.
1) SMOD is set to 1 if you want to double the baud rate else kept it 0
2)GF1 , GF0 is user define flag you can use it as per programming requirements.
3)pd is set to enable the power down mode in this case the internal clock and peripheral clock is kept inactive to save the power. It can be off by resetting the micro controller again.
4)last bit enable Idle mode. CPU clock turned off whereas internal peripheral module such as timer, serial port, interrupts works normally. Interrupt and H/W reset can cancel this mode.


Comments
Post a Comment