Hi,

I'm writing a program in C++ that is driven by events that occur externally to the computer. As far as the program is concerned the event is just a change from false to true and I figure the simplest transmission mechanism would be over a single pin on the serial port (as the only other ports free are USB).

How would I go about getting my program to be interrupted when a wire on the serial in goes high?

As I'm only using the port for simplex communication can I ignore the handshaking usually used with the serial port?

Thanks in advance, Matt.

My (quite limited) history with using serial ports is that I've always used them for data, not pin high/pin low. I've used the "Java Comm" package and a similar class with Visual C++ (can't for the life of me remember which, but it was not part of Visual Studio. Someone else wrote it and I paid $30 or whatever for it). I didn't get into pin high/pin low, but rather used it as data. It had ready made Event Listeners, so when you received a byte from the serial port, there's your interrupt right there. I would think that pin high/pin low would be delving too low into the serial port mechanics. Unless there's a reason to deal with high and low pins, I would imagine it would be easier and better to send a byte at a time. I've done so with a PIC microcontroller.

Anyway, that's my two cents. As I said, my history is limited. Good luck.

This article has been dead for over six months. Start a new discussion instead.