RS 232 to USB converters

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,176
Visit site
Any one know how a PC can determine the status of the CTS or DCD signal of the RS232 connector through a USB port on a PC.

Would like to connect a MOB button to my pc. My old simrad plotter has that function but none of the new goodies like AIS.
 

mikefleetwood

Well-known member
Joined
19 Dec 2005
Messages
3,674
Location
In my shed
Visit site
Totally depends on the software being used to access the RS232.

All standard "terminal emulator" type programs have options to control how the control signals are handled. However, as far as I know, none include the facility to use the control signals for anything but their intended flow-control purpose.

There is, of course, nothing to stop you from writing your own software to make them do whatever you want - if you're so inclined.
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,176
Visit site
Thks I was thinking of writing my own software as I have done in the past with real RS232 ports by accessing the UART registers but I have never done it with the RS232 port connected to the PC via a USB port that of cause does not have control ports.

I used to have a point of sale system where I connected the RTS line to a cash drawer switch and trigger the cash drawer open by changing the port status.
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,176
Visit site
When I wanted to hard wire something into the PC, I used a joystick port.

Interesting idea, if you mean the type that was used with old analogue joysticks I don't think too many of the modern PC and laptops can take that card.

My boat computer is a mini-ITX so has limited buss connections.
 

mikefleetwood

Well-known member
Joined
19 Dec 2005
Messages
3,674
Location
In my shed
Visit site
Thks I was thinking of writing my own software as I have done in the past with real RS232 ports by accessing the UART registers but I have never done it with the RS232 port connected to the PC via a USB port that of cause does not have control ports.

I used to have a point of sale system where I connected the RTS line to a cash drawer switch and trigger the cash drawer open by changing the port status.

If you are familiar with writing your own software (this applies in Windows environment - I've no experience of others) and are using Microsoft development software, is should include all the interfaces to access the hardware. If I recall, it works equally well with RS232 ports through USB as with those locally connected. The interface includes "events" for status changes of all the modem controls, and can directly change their states. I'm some years out of date with current development software for this environment - but the above was my experience with "Visual C++". If I remember, the use of RS232 ports wasn't very well documented!
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,176
Visit site
Thks mike

Most of my software development was in assembly and or pascal so am not upto date with the windows development environment. I as you say these signals can be accessed using the Microsoft development software I can talk to my daughter who knows the Microsoft better than me.
 

GHA

Well-known member
Joined
26 Jun 2013
Messages
12,412
Location
Hopefully somewhere warm
Visit site
A job for an Arduino project?
+1 ?

Would need another USB input into the computer.

What nav software do you use, Roger? Opencpn has ctrl + space as a shortcut to triggering a MOB. Is it possible to prog a script to watch a com port & simulate a key press combination if it sees a specific ascii sequence on the comm port?
 

rogerthebodger

Well-known member
Joined
3 Nov 2001
Messages
13,176
Visit site
A job for an Arduino project?

Thats one way or even using a PIC but a bit of an overkill I think.

+1 ?

Would need another USB input into the computer.

What nav software do you use, Roger? Opencpn has ctrl + space as a shortcut to triggering a MOB. Is it possible to prog a script to watch a com port & simulate a key press combination if it sees a specific ascii sequence on the comm port?

I am using NavmonPC to display instruments and consolidate the incoming data and feed the data to OpenCPN through a virtual port.

Reading up a bit more NavmonPC used RTS line op port A that activate an external alarm and CTS line on the same port to detect a MOB signal from an external switch. At the moment port A is used for my USB GPS and port B is my AIS via a RS232 to USB converter port C is instruments via RS232/USB and port D from the radio DSC via RS232/USB.

What I will try is th change over the GPS and AIS so I can activate the CTS line on port A and see what happens in NavmonPC. If that works I will see if I can right an application to monitor the CTS line as NavmonPC does and create a NMEA MOB message and sent it to OpenCPN as I understand that OpenCPN will react to the MOB message.

http://www.nmea.org/Assets/21030814 nmea 0183_man overboard notification_mob_sentence amendment.pdf

Some info how NavmonPC uses the WPL message to display a MOB location in NavmonPC.

http://navmonpc.com/Downloads/NavMonPc-UserGuide-Supplement-1.04.pdf

It could also be possible is a hardware solution was used the AIS SART message could be used.
 
Last edited by a moderator:

quark-elec

New member
Joined
26 Jun 2015
Messages
28
www.quark-elec.com
I think you should firstly find out which chip you will use for 232 to USB converter. If you use FDTI one(cannot remember the part number),you should be able to download the library code from their website.
 
Top