Printf in LCD 4x20

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Printf in LCD 4x20

927 Views
ivanrobles
Contributor III

Hi,

I'm using a LCD 4x20, Is there a way to use the function printf in my LCD?

What should I do? or What do I need to modify?

Labels (1)
0 Kudos
5 Replies

665 Views
ndavies
Contributor V

Another solution is to use asprintf or sprintf to format and place the output into a character string buffer. You can then send the buffer to the LCD.

0 Kudos

665 Views
ivanrobles
Contributor III

Yes, I used sprintf and it was the solution.

0 Kudos

665 Views
Amit_Kumar1
Senior Contributor II

Hi Ivan,

Please check this link Character LCD with 4 Lines | MCU on Eclipse

I am using this for 4X20 LCD and it is working fine for me. One modification in hardware is required, as in my case LCD required 5V supply but the Kinetis works on 3.3V so for interfacing This LCD I had to use a voltage level shifter in between. The rest you can see on the tutorial. If you are using Processor expert, there is a PE component for that i.e LCDHTA.

Best Regards

Amit Kumar

0 Kudos

665 Views
egoodii
Senior Contributor III

The IAR-toolchain built-in printf function funnels thru a 'write' byte-output function, so if you can make a driver that takes that ASCII and creates the proper display and functions on your display, then off you go.

0 Kudos

665 Views
Paul_Tian
NXP Employee
NXP Employee

Hi, Ivan

What is your LCD interface? Is it UART? If not, I am afraid that you cannot use function printf in your project.

Best Regards

Paul

0 Kudos