Question 10.4: Write a program for the 8051 to receive bytes of data serial...

Write a program for the 8051 to receive bytes of data serially, and put them in P1, set the baud rate at 4800, 8-bit data, and 1 stop bit

The blue check mark means that this solution has been answered and checked by an expert. This guarantees that the final answer is accurate.
Learn more on how we answer questions.

MOV   TMOD,#20H         ;timer 1,mode 2(auto reload)
MOV   TH1,#-6                  ;4800 baud rate
MOV   SCON,#50H          ;8-bit, 1 stop, REN enabled
SETB   TR1                         ;start timer 1

HERE:          JNB     RI,HERE                 ;wait for char to come in

MOV   A,SBUF                   ;saving incoming byte in A
MOV   P1,A                         ;send to port 1
CLR    RI                             ;get ready to receive next

;byte

SJMP  HERE                     ;keep getting data

Related Answered Questions

Question: 10.1

Verified Answer:

The machine cycle frequency of 8051 = 11.0592 / 12...
Question: 10.3

Verified Answer:

MOV    TMOD,#20H       ;timer 1,mode 2(auto reload...
Question: 10.2

Verified Answer:

MOV   TMOD,#20H         ;timer 1,mode 2(auto reloa...