Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to use printf to display amessage in LCD?

Status
Not open for further replies.

btminzon

Full Member level 2
Joined
Jun 12, 2006
Messages
122
Helped
9
Reputation
18
Reaction score
1
Trophy points
1,298
Location
Brazil
Activity points
2,140
Hi people!!! i´m developing an aplication that uses LCD 40x4. I have written the code to show the message, writting byte-to-byte. But takes so much code, and somuch time to do this. I saw in a code sometime ago, using printf function, but i don´t know how to drive the text os the printf function and my LCD logic. I just wanna use printf, instead of wrtitting byte-to-byte. I don´t know if a was clear in my doubt....If anyone understand my problem, and know how to help me, please, i´d be very thankfull!!!

regards
 

Hi

I believe you are using a microcontroller to send the text. and you are using IDEs like KE!L or MP1AB....

It function name need not be printf (its just a name). You can create your own function, and send the string to be displayed to the function. The function can have all the necessary delays and all that.

Just create the program once and you can use it for any program you want (sort of a library)

kannan.k
 

kannan.k said:
Hi

I believe you are using a microcontroller to send the text. and you are using IDEs like KE!L or MP1AB....

yes, i´m using raisonance (like Keil). You know, i thought in doing this, creating my own printf function, but i swear i saw tha code in the programmer used the <stdio.h> printf. I just thought that there is a way to "modify" the standard printf. But, tnkx for the help

regards
 

I think the best way is to write new putchar function (it is used by printf). Which makes lowlevel output of one character on LCD and increases position.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top