From: <li...@ya...> - 2003-01-16 05:38:55
|
Ok I did the baudrate, serial port initialisation , but got the same result.... Below is my code karthik.c # include<8051.h> void sio_init(void) void main(void) { ACC=0x00; PSW=0x00; SP=0x64; sio_init(); _asm; mov a,#"A" mov sbuf,a 00003$: ljmp 00003$; _endasm; } void sio_init(void) { ACC=0xF6; TH1=ACC; TMOD=0x27; TR1=1; SCON=0x50; PCON=0x80; TI=0; RI=0; } The above is the code for 9600 baudrate . I still get '' as the output instead of 'A' . How could i get my desired 'A' at the output ?? Am i correct ?? or should i need to make some other modifications or additions ?? Do reply karthik bala guru --- Dave McGuire <mc...@ne...> wrote: > On Monday, January 13, 2003, at 01:08 AM, mount me > wrote: > > THe following is my code :- > > > > # include<8051.h> > > void main(void) > > { > > _asm; > > mov a,#"A" > > mov sbuf,a > > _endasm; > > } > > > > The output was '' . But i need to get A at output. > > > > Then i tried for a different character. > > i changed the line mov a,#"A" in the above code > > to mov a,#"P" . I the got the same output as '', > but > > i should get the P as output. > > I don't see anything in there regarding UART or > timer (baud rate > generator) initialization...? > > -Dave > > -- > Dave McGuire "She's a cheek pincher. I > have scars." > St. Petersburg, FL -Gary > Nichols > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide > from Thawte > are you planning your Web Server Security? Click > here to get a FREE > Thawte SSL guide and find the answers to all your > SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user ________________________________________________________________________ Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com |