2 Replies Latest reply on Jun 5, 2015 2:57 AM by JoMe_264151

    PSoC Designer PSoC 4 Floating Numbers

       So, I'm trying to print numbers of type float to an LCD screen using sprintf, but my screen isn't displaying things properly. I tested sprintf using integers, and I got that to work, but I still can't get floating numbers to show up. Originally my variables were of type float, but I've sinced changed them to type double. If anyone has a clue to why it's doing this, please let me know. My code is shown below. This is my first time posting, so I'm not sure how to properly copy and paste my code into this text box, so I've attached the file.


      (FYI, the reason I have all LCD commands in the infinite for loop is becasue I need it to be updating regularly).

        • 1. Re: PSoC Designer PSoC 4 Floating Numbers

          Have you enabled nano library -






                    http://www.cypress.com/?id=4&rID=87354     nano library




          Also memory use changed, settings dropped, maybe increase them (note below is for PSOC 5LP) -








          The heap and stack size were reduced in 3.1, try restoring to 3.0 levels 4K and 16K respectively.


          3.1 default settings are now 128 bytes and 2K.


           System tab in Fitterxxxxx*.cydwr file, workspace explorer near the top.






          Regards, Dana.

          • 2. Re: PSoC Designer PSoC 4 Floating Numbers

            Actual version for Creator is now 3.2 (has just rolled out) some minor changes:


            Under  Project -> Build Settings -> Linker -> General you will find two entries concerning newlib-nano. Set both of them to TRUE.


            As Dana pointed to: Set the heap-size in the system-view of the .cydwr file to (at least) 0x0100 bytes.