Serial Ports - Programmers Heaven

Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Serial Ports

samuelmoneillsamuelmoneill Posts: 14Member
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

Comments

  • LundinLundin Posts: 3,711Member
    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.
  • samuelmoneillsamuelmoneill Posts: 14Member
    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

    Thanks

    Sam
Sign In or Register to comment.