Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual C++ microcontroller

Status
Not open for further replies.

knightri

Programmer
Mar 31, 2004
1
US
Hi. Currently I have a Visual C+ program that communicates with a GPS device through a serial-to-USB interface. Analysis of the GPS information leads to a set of control signals being sent to a Motorola HC12 Microcontroller. I was wondering if anyone had any ideas on how this process could take place. Basically the micro controls acceleration and steering for an autonomous vehicle I am working on. From the micro, 5 volts control an analog switch varying +/- 12 volts to a steering motor and alos from the micro a bit signal that sets the correct wiper setting in the digital potentiometer. I need a way to send a signal from the Windows XP laptop I am using to the microcontroller through a serial port. I am using the MarshallSoft GPS DLL to manipulate the USB port that the GPS information comes into. Since I have a serial-to-usb conversion acting on COM4, how do I take control of Com1 lets say and send a particular bit pattern to the micro?????Any help would greatly be appreciated.
 
Simply use the ever flexible CreateFile to open COM1
Then write whatever bits you want to it, in the form your attached micro controller expects.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top