Author |
Message |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Fri Jul 08, 2011 10:32 am Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
Hey PCM:
I took some time to reduce the code size to make the issue simpler to find. Comments describe how to make it work or fail:
/********************************************************* ... |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Thu Jun 30, 2011 7:29 am Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
I found this thread interesting:
http://pic-c.ccsinfo.com/forum/viewtopic.php?t=6334&view=previous
Perhaps when the additional printf is added, the compiler recognises the variables as floats? ... |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Wed Jun 29, 2011 9:23 pm Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
Thanks for your help anyway! |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Wed Jun 29, 2011 5:11 pm Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
Did you build it and see if it does what I said it does?
I could strip it down, but then the issue probably will submerge.
The fact remains that with this code NO printf prints floats correctly. ... |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Wed Jun 29, 2011 3:52 pm Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
i can make it work too...if I add another printf in a completely different routine.
Here's the complete code file. It should work as-is, but fail if the printf (search for CCSINFO) is commented ou ... |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Wed Jun 29, 2011 2:50 pm Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
Sorry - I am using a 16F887. |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Wed Jun 29, 2011 1:42 pm Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
#FUSES INTRC,NOWDT,PUT,MCLR,NOPROTECT,NOCPD,BROWNOUT,NOIESO,NOFCMEN,NOLVP
Compiler Version: 4.122 |
Topic: Printf not printing floating point numbers correctly. |
brock
Replies: 24
Views: 37014
|
Forum: General CCS C Discussion Posted: Wed Jun 29, 2011 9:20 am Subject: PRINTF NOT PRINTING FLOATING POINT NUMBERS CORRECTLY |
All,
I am having the exact issue that CCS newby is having except that putting a print in main doesn't get me out of it, but insertion of a print in another function does.
I even tried the follow ... |
|