On Tue, 19 Mar 2002, MATTHEWS, DEAN (D.) wrote: > I am using the CCs compiler and to output text onto the LCD I use the > putc() function and set up string arrays of the text I want to output. > So would I be right in saying that printf is an easier way than > putc()? Well... if it's just text that doesn't need to be formatted putc() may be more efficient in terms of memory. It certainly is easier to use printf() for anything needing numbers formatted. > Going back to my original question, if for example I had a value of > 200 stored in a variable called NUMBER and I wanted to output the > value stored in number onto the LCD screen could I simply just do: > > printf("value in memory is %02x",NUMBER); Yes, this is exactly what you would do, assuming your LCD is attached serially. Another nice feature of printf() is that you can send the output to another function, one character at a time, like this: printf(lcd_putc,"value in memory is %02x",NUMBER); You'd use this if you need touse lcd_putc() to talk to the LCD. You can also use sprintf() to direct the output to a variable. Dale -- "Curiosity is the very basis of education and if you tell me that curiosity killed the cat, I say only the cat died nobly." - Arnold Edinborough -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics