I'm working on a project where I have to send data from my computer to a microcontroller through a serial port. I'm using the mscomm control which comes with vb5 to send the information. Some of the data I have to send to the microcontroller is single floating point numbers and as I understand it you can't send anything other than bytes through mscomm. So my question is how can I divide up the floating point numbers into 4 bytes that can be reconstructed at the other end of the serial port?
The microcontroller program is written in c and is using the << command with the incoming bytes to put them in the correct spot in a floating point variable.
thanks for your help
Red Flag Submitted
Thank you for helping keep Eng-Tips Forums free from inappropriate posts. The Eng-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Eng-Tips forums is a member-only feature.
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a partâ€™s function at the center of their design considerations. Download Now
Metal 3D printing has rapidly emerged as a key technology in modern design and manufacturing, so itâ€™s critical educational institutions include it in their curricula to avoid leaving students at a disadvantage as they enter the workforce. Download Now
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now