C++/serial port communication using c++
Expert: vijayan - 4/18/2011
Questionsir,
i have been asked to do serial port programming using C++
it should include opening port, close and view the status of the serial port. You should also be able to control speed, timeout,start bit,stop bit,parity bit and stuff like that
please provide me some solution in the form of sample programs,books or techniques..
since i am new to programming,i dont know from where and how should i start
regards,
mayuri
AnswerSerial port programming is somewhat platform specific. Since you are using VC++, I presume that you want to do this on the windows platform.
First get up to speed on the Win32 API for opening, reading and writing files.
http://msdn.microsoft.com/en-us/library/bb540534%28v=vs.85%29.aspx
Then, read up on how to use those functions for serial port i/o.
http://msdn.microsoft.com/en-us/library/ms810467.aspx