Its used to program the start bit, the stop bit and the data
bits of data framing among other things.
8 bit register from MSB ---- to ----- LSB
SM0
|
SM1
|
SM2
|
REN
|
TB8
|
RB8
|
T1
|
R1
|
SM0
SM1
|
These 2 bits determine the framing of data by specifying
number of bits per character and start and stop bits. they take following
combo.
|
|||||||||||||||
SM2
|
This enables multiprocessing capabilities of 8051. Usually set to 0
|
|||||||||||||||
REN
|
Also referred to as SCON.4 as SCON is a bit addressable
register. This is receive enable. When high or 1 it allows 8051 to receive
data from RxD pin. Used or access as
SET SCON.4 and CLR SCON.4. very useful in blocking external serial reception.
|
|||||||||||||||
TB8
|
Transfer bit 8. Used for serial mode 2 and 3 not generally used so set
it always to 0
|
|||||||||||||||
RB8
|
Receive bit 8. Again used for serial mode 2 and 3 not used
so set it to 0
|
|||||||||||||||
T1
|
Transmit interrupt. Important flag bit in SCON register. When 8051
finishes transfer of 8 bit character, it raises the T1 flag to indicate that
it is ready to transfer another byte. Is used at beginning of stop bit.
|
|||||||||||||||
R1
|
Receive interrupt. Another important flag bit in SCON
register. When 8051 finishes receiving data i.e when data is successfully
stored in SBUF it raises R1 flag to indicate byte is received and to be
picked before it gets lost.
|
where we use SM2
ReplyDeleteWhat i remember is that SM2 is used to communicate with other microcontrollers cause no other communication protocols were available at that period of time for communication among microcontrollers....
DeleteHope this helps....
sm2 pin in serial control used for communication in between two processors like cpu-cpu communication.
DeleteNice explaination
ReplyDeleteThanks Keep Visiting....
DeleteNice explaination
ReplyDeleteThanks Keep Visiting....
DeleteNice explaination
ReplyDeleteThanks Keep Visiting....
Deletethanku
ReplyDeleteYou are welcome..Keep visiting..
Deletethanku
ReplyDeleteYou are welcome..Keep visiting..
Delete