PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Oct 20, 2009 2:40 pm |
|
|
I assume you are typing these characters into a terminal window on
your PC, and sending them to the PIC via RS-232.
In that case, you can use the get_float() function to get the string
and convert it to a floating point number and put it in a variable.
The get_float() function is in this file:
Quote: | c:\program files\picc\drivers\input.c |
You can display the variable with the printf() function. The '-' symbol
will automatically be displayed by printf, if necessary. But to display
the '+' symbol, you'll need to check if the number is positive, and then
if so, display the '+' with printf(). |
|