0
votes

I want to communicate between an Embedded device and my PC using C codes for serial-port.

Anyone can suggest me how can I send and receive Serial or UART data using COM ports of my computer in Windows Environment(Windows7 or Windows8 64bit).

Please give me any link or any codes for suggestion ... Thanks ...

1
Standard C does not know about serial port or UART. You need to tell us your operating system (or your hardware platform if running without OS on the bare metal). So please add the Windows tag if relevant. - Basile Starynkevitch
Windows7 or Windows8 64bit - sgsudhir
Please edit your question to improve it - Basile Starynkevitch

1 Answers

1
votes

To connect to the COM port, use CreateFile():

http://support.microsoft.com/kb/115831

Then use ReadFile() or WriteFile() to access the port.