If you don't need a full printf, you can also use puts 
which also uses putchar.


> Thanks for the reply. On your reccomendation, I looked at some print 
> examples, but didn't need anything as powerful as printf.
> I just created a print_LCD (unsigned char* message). function. Here's the 
> working code for anyone at my level...
> 
> void WriteLCD( unsigned char* message )
> {
> ?unsigned char i;
> ?
> ?for( i=0; i<32; i++ )
> ?{
> ??if( !message[i] )
> ???break;
> ???
> ??DATA_OUT(message[i]);
> ?}
> }??
> Thanks for the lead.
> Ron
> 
> 
> -----Original Message-----
> From: Jacques Pelletier <jpellet...@ieee.org>
> To: sdcc-user@lists.sourceforge.net
> Sent: Sat, 3 Jan 2009 3:21 pm
> Subject: Re: [Sdcc-user] LCD print("string") function?
> 
> 
> 
> On January 3, 2009 02:16:53 pm ronnym...@aol.com wrote:
> >  This is probably a very basic question, but since I am new to SDCC and the
> > 8051, I will ask anyway. How can I create a function that will allow me to
> > write a command like  Print_to_LCD("Hello"); without having to previously
> > store the text to code space or data space and using a pointer. I have a
> > character print routine running for the I2C LCD already. I just need to
> > know where to find the ("text") to print after the function call.
> > Thanks,
> > Ron
> >
> >
> > **************
> > New year...new news.  Be the first to know what is making
> > headlines. (http://www.aol.com/?ncid=emlcntaolcom00000026)
> 
> If you define your own function putchar to send characters to the LCD, you 
> can 
> use printf to print strings. It should call your putchar routine.
> 
> JP
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Sdcc-user mailing list
> Sdcc-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sdcc-user
> 
> 



------------------------------------------------------------------------------
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to