|
From: J S <g1p...@ya...> - 2005-06-18 01:48:49
|
Hi All, I know this is prolly a very simple question for all you experts out there, but how do you setup serial communictaions with sdcc when using an AT89C2051 controller? I tried playing with some examples I have, but they are all for Keil and don't seem to be working. My basic goal is to send a "test" message to a serial LCD display that requires 9600 baud rate and a 8 bit data and 1 bit stop transmission with no parity. I wrote this up to initialize the serial communication: SCON=0x50; TMOD=0x20; TH1=0xFD; TR1=1; T1=1; This combination seems to be ok, as I can send one letter to the display by: SBUF='T'; But, if I send another letter that way, it just erases the previous one. I thought this might have something to do with the display so I then sent a specific command for it to shift the cursor over by one, but it still didn't help. Also, I did try to use printf_tiny but every time I use it, I get a link warning: ?ASlink-Warning-Undefined Global '_putchar' referenced by module 'printf_tiny' And if I tried programming the 2051 even with that warning, it won't work. Not sure what I'm doing wrong, so any help would be appreciated :-) Thanks, J Silverman __________________________________ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html |