You are here

char LCD display | Cypress Semiconductor

char LCD display

Summary: 5 Replies, Latest post by gkavin on 08 Feb 2012 10:48 PM PST
Verified Answers: 1
Last post
Log in to post new comments.
gkavin's picture
User
27 posts

Using sprintf,  i could display the integer (int16) on the LCD (PSoC creator, PSoC3). But i am finding problem in displaying  long int and int32. Pl suggest me.

user_1377889's picture
User
10803 posts

Use %dl and %dL for other int-formats.

 

Bob

gkavin's picture
User
27 posts

Still i couldn't succeed. this is the code i have written. What's my mistake

char OutputString[12];

uint32 d;

d=75000;
LCD_Char_1_Position(1,1);
sprintf(OutputString,"%dI",d);
LCD_Char_1_PrintString(OutputString);

Jack31's picture
User
15 posts

 Try this

sprintf(OutputString,"%ld",d)

user_1377889's picture
User
10803 posts

Sorry, my error it must be "%ld" and it is a "l" like "long" (small "L").

Look here: http://publications.gbdirect.co.uk/c_book/chapter9/formatted_io.html for formats.

Bob

 

 

gkavin's picture
User
27 posts

it's working. thanks

Log in to post new comments.