Anonymous
Not applicable
Feb 07, 2012
05:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 07, 2012
05:13 AM
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.
Solved! Go to Solution.
Labels
- Labels:
-
PSoC 3
1 Solution
Feb 07, 2012
08:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 07, 2012
08:58 AM
5 Replies
Feb 07, 2012
08:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 07, 2012
08:58 AM
Use %dl and %dL for other int-formats.
Bob
Anonymous
Not applicable
Feb 07, 2012
11:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 07, 2012
11:11 PM
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);
Anonymous
Not applicable
Feb 08, 2012
02:41 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 08, 2012
02:41 AM
Try this
sprintf(OutputString,"%ld",d)
Feb 08, 2012
02:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 08, 2012
02:47 AM
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
Anonymous
Not applicable
Feb 08, 2012
10:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 08, 2012
10:48 PM
it's working. thanks