Topic: Serial COM port

Can anyone suggest a way for Simply Fortran to support serial communication through a COM port?

With modern computers a COM port is usually implemented as a USB-UART (RS-232) converter which shows up in the Windows Device Manager as a COMn port, n being the number assigned to the port.

What I need is to be able to Send/Receive data to the COM port from within a Fortran program

What would be the simplest way to do this?

Re: Serial COM port

I'm not sure modern Windows machine still implement "magic" files like COM1 such that a call like OPEN(FILE='COM1', ...) would work without substantial additions to the Fortran runtime library.  You would be better off using an external library.  However, I don't know of a Fortran library, so I would guess one would have to wrap a C library to access the COM port.  I'll look around, but I can't make any promises.

Jeff Armstrong
Approximatrix, LLC

Re: Serial COM port

I would also like to know if com port communications are possible using Approximatix Fortran!
Anyone have any experience doing this?

Jimmy

Re: Serial COM port

I currently have a library with a Fortran wrapper now working, and I'll see that the source code is available in the next few days.  The Fortran code is actually wrapping the RS-232 library in a module that should be easy enough to use.

Jeff Armstrong
Approximatrix, LLC

Re: Serial COM port

The RS-232 library is now available in the SF Package Manager for subscribers.

Jeff Armstrong
Approximatrix, LLC