View a decimal number on LCD

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Request help for PSOC 5LP
Hello, 
I have a little problem on PSOC 5LP.  I have to be displayed on a LCD display a decimal value (2.5 V). The problem is: the software can not show me the decimal value.
Cordially

0 Likes
1 Solution
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Use sprintf. (this allows you to print in whatever format you need, into a char buffer, which you then show on the LCD)

View solution in original post

0 Likes
10 Replies
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Use sprintf. (this allows you to print in whatever format you need, into a char buffer, which you then show on the LCD)

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I use sprintf. and it does not work. For several days I try to solve the problem but nothing was done. I put you in my piece seal program.
Thank you

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

There is some more you have to check/set

   

Set the heap size (.cydwr "System" tab) to >= 0x0200

   

Set "use newlib nano" and "use newlib nano float formatting" to "true" (Project build settings, linker options)

   

It is always advisable to post the complete project, it allows us to use the IDE, check your settings and even run / debug your program with medium effort. To do so, use

   

Creator->File->Create Workspace Bundle (minimal)
and attach the resulting file.

   

 

   

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

I send you into zip file, my full program because I still can not display a decimal number.
Thank you

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

As I originally suggested: Set the heap size to 0x0200 and sprintf() will work.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

What means: Set the heap size to 0x0200 ?

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Open the design-wide resources (the *.cywdr file), go to "system" tab, there you can set it.

0 Likes
lock attach
Attachments are accessible only for community members.
rola_264706
Level 8
Level 8
50 likes received 25 likes received 10 likes received

Here are some pictures to help you.

0 Likes
Anonymous
Not applicable

Hello, thank you for your help but it still does not work.

0 Likes
Anonymous
Not applicable

Thank you for your help, all work properly for the decimal display on the LCD.

0 Likes