The serial terminal software (Parallax Serial Terminal or equivalent) just displays characters. It doesn't do the conversion from some kind of internal number format to characters. 0.30 is just the characters "0",".","3","0" and 2.3 is just the characters "2",".","3". If you're using a Propeller for the microprocessor, there are floating point objects available, one that does the actual calculations in floating point and another that will convert the internal floating point values to character strings that can be sent to some kind of display. If you're using a Stamp, that is really inadequate to do floating point unless you use some kind of external arithmetic processor like this one that does the floating point to string conversion as well. You can easily do fixed point scaled arithmetic where you might have a variable where 0.30 is represented as an integer 030. It's easy to display that sort of scaled value in a more readable format by using something like this where X is the 16-bit unsigned scaled value (0.00 to 655.35):
The serial terminal software (Parallax Serial Terminal or equivalent) just displays characters. It doesn't do the conversion from some kind of internal number format to characters. 0.30 is just the characters "0",".","3","0" and 2.3 is just the characters "2",".","3". If you're using a Propeller for the microprocessor, there are floating point objects available, one that does the actual calculations in floating point and another that will convert the internal floating point values to character strings that can be sent to some kind of display. If you're using a Stamp, that is really inadequate to do floating point unless you use some kind of external arithmetic processor like this one that does the floating point to string conversion as well. You can easily do fixed point scaled arithmetic where you might have a variable where 0.30 is represented as an integer 030. It's easy to display that sort of scaled value in a more readable format by using something like this where X is the 16-bit unsigned scaled value (0.00 to 655.35):
Comments
SEROUT <I/O pin>,<Baud constant>,[DEC X/100,".",DEC2 X//100]
Mr Mike thank you very much for your reply, is exactly what I was looking for.