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
Try: mov SBUF,#0a;
But what's about while(1); ?
#0A is a valid character, but not the letter 'A'. #0A would be the line-feed character.
you wanting gooder anser yes?????
waiting for sir erac and he give you wise and acurete anser you be wanting.
he is good and kind and clevar and wise.
here are the links to "the bible" all you need can be found here:
Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf
Chapter 2 - 80C51 Family Programmer’s Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
kalib, I declare you as a erik malund propagandist :) Are you into the RP business, too?
you be seeing!!!!!
i new sir erac give goodly anser.
i now finish my time in corner so i throw my hat to basket and can code again.
yes................kalib is back and is now bettter
I meant PR business, or course.
who put you in the corner? a teacher? or maybe erik :) :)
on the other hand, RP could mean "reverberating propoganda". ok sorry, now I'm beginning to spam. sorry.
View all questions in Keil forum