|
From: Jean-Paul <tch...@fr...> - 2005-06-19 09:25:59
|
Hi, Your AT89C2051 works fine. So do your putchar routine and all that stuff. In fact, it looks like you want to write on your serial LCD as you would = =20 do on a terminal. I suppose you have to send an address to your LCD: row and character =20 positions. It could be that you need to do that with every character, or you can =20 configure you LCD to increment automatically the write position. What is the type of your serial LCD, where can I find its manual or data = =20 sheet? Regards Jean-Paul On Fri, 17 Jun 2005 18:48:43 -0700 (PDT), J S <g1p...@ya...> wrot= e: > 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=3D0x50; > TMOD=3D0x20; > TH1=3D0xFD; > TR1=3D1; > T1=3D1; > > This combination seems to be ok, as I can send one > letter to the display by: > > SBUF=3D'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 > > > =09 > __________________________________ > Discover Yahoo! > Find restaurants, movies, travel and more fun for the weekend. Check it= =20 > out! > http://discover.yahoo.com/weekend.html > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dcl= ick > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > --=20 NEVER jump into a LOOP! |