Int2float
Posted: Sat Jul 02, 2011 8:41 pm
I get lost. I have the byte Count and the float Sin3. To convert Count from byte to float I use the euqation:
sin3 = int2float(Count).
In the simulation this works correct, but in the PIC877A the byte Count=203 will be converted into the float Sin3 = 200.0000.
See test2 file at the main macro next to remark "Here the Count(byte) will be converted into Sin3 (float)"
What do I wrong?
Regards,
Jan Lichtenbelt
PS. In the meanwhile I find out that any mathematical equation on this place gives wrong results.
sin3 = int2float(Count).
In the simulation this works correct, but in the PIC877A the byte Count=203 will be converted into the float Sin3 = 200.0000.
See test2 file at the main macro next to remark "Here the Count(byte) will be converted into Sin3 (float)"
What do I wrong?
Regards,
Jan Lichtenbelt
PS. In the meanwhile I find out that any mathematical equation on this place gives wrong results.