Hello,
I am seeking assistance in triggering a Sun box(Ultra 5) via the ttyb port. Let me explain my delima. Currently, we have a 3rd party card with a discrete input that can be used to generate an interrupt on the host. In our application, we wait for this interrupt to occur and then proceed to perform some work and respond with a status bit back to the triggering machine. When that work is completed, we wait for another interrupt. We are upgrading the systems and this card is no longer manufactured. I am attempting to eliminate this card completely and use the ttyb port instead.
First off, I only have one line from the controlling computer for triggering and one line back to the controlling computer for status. Therefore, I do not have the full complement of lines available for complete RS-232 communications.
I have been able to pulse the Data Carrier Detect(DCD) line from a PC, and, in the Sun box, perform a "select" on ttyb and wait for data. Through this mechanism, I am able to get my application to wait for this signal to appear on the ttyb port but with some ramifications:
First off, it appears that unless I place a wait(or sleep) in my test loop, then once the first pulse occurs on DCD my loop will run continuously and not wait for a DCD pulse the next time through. If a sleep(1) is present, then for each itteration of the loop, I can pulse the DCD line and get it to work. Of course, this is not practical since I will need my loop to have a finer resolution than 1 second.
Has anyone ever used the RS-232 lines for triggering a computer? I am sure that it is simply a matter of port configuration and proper jumpering of the port lines to make this work.
Any help would be greatly appreciated,
Chris
I am seeking assistance in triggering a Sun box(Ultra 5) via the ttyb port. Let me explain my delima. Currently, we have a 3rd party card with a discrete input that can be used to generate an interrupt on the host. In our application, we wait for this interrupt to occur and then proceed to perform some work and respond with a status bit back to the triggering machine. When that work is completed, we wait for another interrupt. We are upgrading the systems and this card is no longer manufactured. I am attempting to eliminate this card completely and use the ttyb port instead.
First off, I only have one line from the controlling computer for triggering and one line back to the controlling computer for status. Therefore, I do not have the full complement of lines available for complete RS-232 communications.
I have been able to pulse the Data Carrier Detect(DCD) line from a PC, and, in the Sun box, perform a "select" on ttyb and wait for data. Through this mechanism, I am able to get my application to wait for this signal to appear on the ttyb port but with some ramifications:
First off, it appears that unless I place a wait(or sleep) in my test loop, then once the first pulse occurs on DCD my loop will run continuously and not wait for a DCD pulse the next time through. If a sleep(1) is present, then for each itteration of the loop, I can pulse the DCD line and get it to work. Of course, this is not practical since I will need my loop to have a finer resolution than 1 second.
Has anyone ever used the RS-232 lines for triggering a computer? I am sure that it is simply a matter of port configuration and proper jumpering of the port lines to make this work.
Any help would be greatly appreciated,
Chris