This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

send a continous char

does anyone have an idea of how to continuously send a character using the UART function on an 8051 in assembly language. the following code i have doesnt seem to work, the compiler tells me theres a syntax error in the mov SBUF, #A line. many thanks:

ORG 0x00;

mov TMOD, #20H ; //T1 is mode2
mov TH1, #0x3 ; //9600 baud
mov SCON, #50H ; //8b, REN enabled
setb TR1 ; //start T1

mov SBUF, #A ; //letter A is transmitted

while(1);

clr TI ; //clear TI for the next character
sjmp SBUF;

end

0