Anonymous
Not applicable
Feb 01, 2015
10:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feb 01, 2015
10:01 PM
Hi there,
I got a string from TeraTerm: numbuf and want to convert it to set_voltage (define as float) , so I use sscanf function:
sscanf(numBuf, "%f", &set_voltage)
Then I want to print that set_voltage to the LCD so I use sprintf to convert it to ASCII string resultbuf (define as char resultbuf[6]) :
sprintf (resultbuf, "%3.1f", set_voltage);
then use
LCD_PrintString(resultbuf); to the LCD.
but I got some wierd characters on the LCD.
Can anyone explain to my why?
I just want to print a float number to LCD.
Labels
- Labels:
-
PSoC 5LP
9 Replies