Search This Blog

Monday, November 14, 2011

SBUF register

Its an 8 bit register used solely for serial communication in 8051. For a byte of data to be transferred via TxD line, it muse be placed in SBUF register. Similarly SBUF register holds the serially inputed data received by TxD line of 8051.

Accessed as:

MOV SBUF,#’S’ ;load ascii

MOV SBUF,A  ;

MOV A, SBUF  ;

The moment the byte is written in SBUF, it is framed with start and stop bits and transferred serially through TxD line.
 
Similarly when bits are received serially via RxD it is deframed by eliminating stop and start bits and a byte of data is received and placed in SBUF.

1 comment: