ffr58kk90
Junior Member
Offline
Posts: 40
Thank You
-Given: 131
-Receive: 0
|
|
« on: April 27, 2014, 02:55:43 14:55 » |
|
Hi
I have been struggling along trying out MikroBasic Pro for PIC, i've connected the pic, a 16f876 via a max232 to the RS232 port on my pc, I can send characters from the pc, they get echoed back using the sample MikroBasic code from the manual.
What I am trying to achieve is to send out a series of digits from the PC serial port and save them in the pic as a floating point variable so I can do some maths on them.
For example, from the PC I type 12.34567, how do I save this as a float variable?, I have tried using uart1_read_text, and saving the value as a text string, but there is no function to convert this to a float, I can send it back to the pc so I know it has been received correctly.
I can also save the incoming data character by character and store it in a byte array, but how then can I make this into a float variable?
I am totally stumped, can anyone help please,
Thanks
Regards Ffr.
|