Professional Documents
Culture Documents
8051 Serial Port - Mode 0: 10 Bits Are Transmitted / Received
8051 Serial Port - Mode 0: 10 Bits Are Transmitted / Received
1. Start bit
2. Data bits (8)
3. Stop Bit
Step I: The TMOD register is loaded with value=20H indicating Use of Timer1 in mode 2 i.e
8-bit Auto-reload
Step II: TH1 register is loaded with one of the values to set the baud rate for serial
communication
Step III: The SCON register is loaded with the value
Here: JNB TI, Here ;The TI flag bit is monitored with the use of instruction
Here: JNB RI, Here ;The RI flag bit is monitored with the use of instruction
Write an ALP for 8051 to transmit letter 'A' serially at the baud rate 4800 continuosly
org 00H
MOV TMOD,#20H
MOV TH1,#-6
MOV SCON,#40H
SETB TR1
Again: MOV SBUF,#'A'
Here:JNB TI,Here
clr TI
sjmp Again