Hi all. I have a unique challenge that I can't find an answer to on the net. I have NO experience with programming so am relying on those with the knowledge to help me. I think I need a small program written to do my task.
I am interfacing a standard printer port to a video projector so I can control the functions of zoom, shift, etc by using my pc. So far it works well, with a hi from pins 2 to 9 (data 0 to 8) turning on npn transistors wired across the pressure pads in the projectors remote-control (there is no serial access these functions).
However, I want to "time" the various outputs to stay on for fixed durations, rather than triggering and holding the outputs high by generic software switches.
Is it possible that a small program could be written (in C?) to time each required pin high for a certain time?
Here is the sequence I need:
PRINTER PORT
Step 1 - Pin 9: take high for 1 second.
Step 2- wait 1/4 second
Step 3 - Pin 8: take high for 9 seconds
Step 4 - wait 1/4 second
Step 5 - Pin 6: take high for one second
Step 6 - wait 1/4 second
Step 7 - Pin 5: take high for 5 seconds
Step 8 - wait 1/4 second
Step 9 - Pin 2: take high for 3 seconds
The wait states are due to the projectors need to handle these commands in sequence, i.e. not all at once.
To get timings accurate I need to be able to vary each one by several seconds either way. Perhaps if the timers could be programmed from say 1 to 10 seconds (and down to 1/10ths), that would allow me to determine and set the best times for each function. The wait states could be set at a fixed duration - anywhere from 1/4 to 1/2 a second is fine.
The ability to recall several sets of settings would allow me to callup a different set of timings, should I need them. The program needs to remember all settings and memories. I don't mind if it has to work in a DOS box (I am running XP SP3).
The most tricky thing I think is the need for the timers to work in the steps given. So Timer 1 needs to start first, then it hands over to 'wait', then Timer 2 starts and it hands over to wait and so on till the end, when everything can remain low (off).
If all works as intended, the projectors image will have zoomed in, shifted up and slightly to the right, to position a 2.35 aspect-ratio dvd image centrally on a 2.35 ratio screen. The settings are peculiar to this particular brand of machine when changing from 1.85 widescreen.
As far as starting the sequence, I need it to start from an external momentary switch closure. Could one of the unused 'input' pins on the same parallel port be used for this instruction?
I hope this hasn't been too long and boring for the reader (or this great forum) but I think you can see this is a quite a simple solution in the end run, as compared to going the plc or pic ways, which I just cannot afford to do!
Many thanks in advance for any help.
I am interfacing a standard printer port to a video projector so I can control the functions of zoom, shift, etc by using my pc. So far it works well, with a hi from pins 2 to 9 (data 0 to 8) turning on npn transistors wired across the pressure pads in the projectors remote-control (there is no serial access these functions).
However, I want to "time" the various outputs to stay on for fixed durations, rather than triggering and holding the outputs high by generic software switches.
Is it possible that a small program could be written (in C?) to time each required pin high for a certain time?
Here is the sequence I need:
PRINTER PORT
Step 1 - Pin 9: take high for 1 second.
Step 2- wait 1/4 second
Step 3 - Pin 8: take high for 9 seconds
Step 4 - wait 1/4 second
Step 5 - Pin 6: take high for one second
Step 6 - wait 1/4 second
Step 7 - Pin 5: take high for 5 seconds
Step 8 - wait 1/4 second
Step 9 - Pin 2: take high for 3 seconds
The wait states are due to the projectors need to handle these commands in sequence, i.e. not all at once.
To get timings accurate I need to be able to vary each one by several seconds either way. Perhaps if the timers could be programmed from say 1 to 10 seconds (and down to 1/10ths), that would allow me to determine and set the best times for each function. The wait states could be set at a fixed duration - anywhere from 1/4 to 1/2 a second is fine.
The ability to recall several sets of settings would allow me to callup a different set of timings, should I need them. The program needs to remember all settings and memories. I don't mind if it has to work in a DOS box (I am running XP SP3).
The most tricky thing I think is the need for the timers to work in the steps given. So Timer 1 needs to start first, then it hands over to 'wait', then Timer 2 starts and it hands over to wait and so on till the end, when everything can remain low (off).
If all works as intended, the projectors image will have zoomed in, shifted up and slightly to the right, to position a 2.35 aspect-ratio dvd image centrally on a 2.35 ratio screen. The settings are peculiar to this particular brand of machine when changing from 1.85 widescreen.
As far as starting the sequence, I need it to start from an external momentary switch closure. Could one of the unused 'input' pins on the same parallel port be used for this instruction?
I hope this hasn't been too long and boring for the reader (or this great forum) but I think you can see this is a quite a simple solution in the end run, as compared to going the plc or pic ways, which I just cannot afford to do!
Many thanks in advance for any help.
Last edited: