Hello, this is my first posting here and I must admit I have quite a little problem on my hands. I'm not sure if this is just a simple solution or if it is a hard one. I have a device that interfaces to the computer via a parallel port. Depending on what data the device recieves, it switches on 64 lamps. (so, if the device recieves a "1" through the parallel port, lamp 1 turns on, and so forth)
To give the appearance that all the lamps are on, I created a loop that individualy turns on each lamp in turn. Because the human eye can only percieve flicker over about 50hz, the lamps appear to all be on.
My problem is this: The loop works fine by itself, but I want to have other stuff (other loops, sound, etc) running at the same time. Would it be possible to make a loop that ran in the background of the rest of the Qbasic program? The status of each bulb is stored in an 64bit array. During the run of the program, the values for different lamps are almost always changing. So i would need to make a loop that ran in the background and took in the new data with each loop. Is this possible in Qbasic? Could someone advise me of a way to do it with, say, a C loop? (i don't know C mind you...)
Second, If i decide i want each lamp pulsed for, say, 2ms, what can I add to the loop to make the program time each pulse?
Thank you in advance, I hope all of this is very clear, if not, please tell me!
Thanks!
mingo
mingo7707@yahoo.com.ar
To give the appearance that all the lamps are on, I created a loop that individualy turns on each lamp in turn. Because the human eye can only percieve flicker over about 50hz, the lamps appear to all be on.
My problem is this: The loop works fine by itself, but I want to have other stuff (other loops, sound, etc) running at the same time. Would it be possible to make a loop that ran in the background of the rest of the Qbasic program? The status of each bulb is stored in an 64bit array. During the run of the program, the values for different lamps are almost always changing. So i would need to make a loop that ran in the background and took in the new data with each loop. Is this possible in Qbasic? Could someone advise me of a way to do it with, say, a C loop? (i don't know C mind you...)
Second, If i decide i want each lamp pulsed for, say, 2ms, what can I add to the loop to make the program time each pulse?
Thank you in advance, I hope all of this is very clear, if not, please tell me!
Thanks!
mingo
mingo7707@yahoo.com.ar