How do I get different outputs on LCD display an in hyperterminal

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

cross mob
Anonymous
Not applicable

Hello Community,

   

I am working PSoC 5LP and I am still a beginner so I hope my problem is a simple one for you. I managed to let my attached lcd display show me the results of a simple resistance measurement. I want to collect the values of my measurements for further studies. Therefore I am also using a hyperterminal to watch my output data. So far this is no problem. But unfortunately the display only knows hex-code. So by using hex-code for the lcd display for a degree sign I totally mess up the output data which is shown on the hyperterminal. So my collected data is not usable anymore.

   

Now my question: How do I manage I get my measured data correctly shown both on my display and in the hyperterminal.

   

Basically I think the output data is coming first, just the values the PSoC is throwing out. And secondly the lcd display is taking the data and is showing them. Is this simple line of thought right or am I totally wrong?

   

Thank you very much in advance for your answers!

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

The magic word is "sprintf()".

   

The LCD routines already have got a conversion routine for integer to numbers. To read data in HyperTerm (or PuTTY) you need to convert the data to printable ASCII characters which is done best with sprintf(). Instructions for use here.

   

In Project -> Build settings set Use newlib-nano and use newlib-nano float formatting to TRUE.

   

In .cydwr -> System make sure that heap is at least 0x0100

   

 

   

Happy coding!

   

Bob

View solution in original post

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

The magic word is "sprintf()".

   

The LCD routines already have got a conversion routine for integer to numbers. To read data in HyperTerm (or PuTTY) you need to convert the data to printable ASCII characters which is done best with sprintf(). Instructions for use here.

   

In Project -> Build settings set Use newlib-nano and use newlib-nano float formatting to TRUE.

   

In .cydwr -> System make sure that heap is at least 0x0100

   

 

   

Happy coding!

   

Bob

0 Likes
Anonymous
Not applicable

Thank you!

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

The formatting string used in sprintf/printf, see attached ref material.

   

 

   

Regards, Dana.

0 Likes