Serial Ports

Hi guys,

I need to be able to create a program that allows a WinXP machine to communicate with an LCD Screen through Com 1 RS232. I have been searching the internet far and wide for answers for about a week now and have had no luck. The only answers I am able to find support Linux.
I need to write the program in ANSI C (GCC compiler).

Any suggestions would be greatly appreciated


  • Regarding serial ports in Windows, there are numerous examples on this site and on the net as whole.

    Regarding how a specific LCD works, only the data sheet can tell.

    Regarding ANSI C, it is not possible to write a standard-compliant program in Windows that uses the serial port - you have to use Win API functions.
  • I have had a look at the data sheet and it gives a table with the different character conversions such as 128 + 9 = 137 gives character output superscript 9.

    With regard to using the Windows API, its functions are written in C++ whereas I need them in C.

    If I was able to communicate with a general port and send any general character I would be happy. I would then be able to use the data sheet to send the relevant characters to scren.

    Would you be able to help to set up the port in C and be able to send characters. If you could help me to convert CreateFile()(C++) to C I might be able to get somewhere


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!