sgsudhir
sgsudhir

Reputation: 11

C program to send and receive serial(UART) data using COM ports

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 ...

Upvotes: 1

Views: 5154

Answers (1)

Shlomi Agiv
Shlomi Agiv

Reputation: 1198

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

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

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

Upvotes: 1

Related Questions