We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
hi everyone I'm looking for a good alogrithm to send a float variable to a PC by the serial port. First I have to separate the float variable in bytes to be read to send by the serial port. do i have to send the variables in binary or ascii?? what do you recommend me?? Another problem is in the pc.. if I want to use visual basic to print the value how can I join the bytes to have the real float variable?? thanks
Hi, My name is Claudio from Argentina. I had the same problem, but the microcontroller I'm using is a PIC 16F876. What I did was to use this article in the Microsoft Knoledge Base, were I could get the individual bytes of a VB long type variable: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q171652 This same works for single, or double floating point real types, so you can change the individual bytes with the ones received from the UART. I hope this would help.