C program communicate with serial port?

Hi.

I am working on a university project at Chalmers where we need to make a C program that communicates with a serial port. The program will be runned in Windows. I am pretty sure that it will be an USB port.

So my question is: How do you write a C program that communicates with an USB port? We want to avoid C++ atm. since we are supposed to do it in pure C first if that is possible. I have some basic experience with C and C++ so I should be able to pull this off with a library and some guidance. However, I have never done serial communication before and specially not through an USB port. So I feel rather lost and confused.

The communication will be really simple. All we need to do is to send about 2 bytes or more from the C program through the USB port.

Thanks for all help!
Best regards, Zerpent.

Topic archived. No new replies allowed.