Printf in LCD 4x20

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Printf in LCD 4x20

2,151件の閲覧回数
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?

ラベル(1)
0 件の賞賛
返信
5 返答(返信)

1,889件の閲覧回数
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 件の賞賛
返信

1,889件の閲覧回数
ivanrobles
Contributor III

Yes, I used sprintf and it was the solution.

0 件の賞賛
返信

1,889件の閲覧回数
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 件の賞賛
返信

1,889件の閲覧回数
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 件の賞賛
返信

1,889件の閲覧回数
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 件の賞賛
返信