- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
i would like to display the results of a division as a float using sprintf and display it using the UART communication component.
My code is give below.
float ft,db;
UART_UartPutString(buffer);
I don't get any value at all on my terminal program.
Just
value=
I am unable to understand how to display float values using sprintf.
I am using PSOC Creator 3.2
thanks
a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 steps to success:
Update to latest Creator 3.3 CP3
under Projects-> Build Settings -> Linker: Set Use newlib-nano float formatting to true
in .cydwr view (where you set the pins) "System"-tab: set Heap size to 0x0200
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Same problem with PSOC 5LP, increasing heap size finally solved the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for the quick reply, its working in 3.3, I am able to get the float values displayed.
However there is a problem in the PSOC Creator 3.3 CP3 software.
I have noticed that changes to the font size and style do not get saved, they keep getting back to the default setting.
Also the recent projects list is not updated, no recent projects are displayed. Also the software startup is very slow.
All the above problems surfaced suddenly after the program froze, and I had to restart the computer.
However thanks for your help, I realize I may have to raise a support ticket or something.
thanks
a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are low on resources on your computer Or it is a very slow processor clock. Try to reinstall the software again.