Serial Port/Quiz Program
I am fairly new at this, so I am going to put some stuff out there and see if anyone can lead me in the right direction.
Right now I have a "quiz box" which interfaces with three sets of 5 seat pads. When all fifteen people are sitting in their seat, no lights are on, however, when a person jumps, his and only his light goes on...to identify the fastest jumper. It also has circuitry for resetting the lights and adding timers and so on.
Now for the good stuff...
I would like to write a computer program that will track the lights and also interface with a scoring program (which i haven't written yet, but will, once i decide how all this is going to work out.) My question is this:
Do I need to modify the circuitry and have a signal come off that into the computer, or could I let the computer do all the work...my idea(and let me know if this is not possible) was to use one pin for each seat(15) and let the newly designed computer program process everything, from determining who jumped up first to displaying the scoring dialogue.
I do not know what the pin assignments are...could they all be receiving data? And could they interface with a program?
I know this is alot. Can anyone who give some advice, or a place to start at least?
I don't think this is possible. A serial connection is designed to send 1 bit of data at a time not 15 symiltaniously. Only one pin is used for data receive and another for data transmision. I don't think the OS is capable of interacting with the serial port on such a low level and if it did data send/transmision wouldn't be so reliable. I think you're either going to have to have the quiz box send the fastest time to the computer or send all times and let the computer calculate the fastest.
Thank You for the reply.
Basically the way it is set up now, the box does not actually compute times as far as i can tell (i did not design it) I believe, it simply has the first seat to create continuity turn on a light and the rest do not have the option at that point.
So my goal now is to get some interface from that box to the computer...or create a new simpler box.
What you want to do is possible, but not easy to figure out. I would suggest using the printer port as it has more inputs and outputs than a serial port, it can go either way and inputs can be simultaneous. Depending on what kind of light you plan on using you will need to make/use a relay board as the parallel port can't light more than an LED. Also you will not want to power the inputs as the ports can only handle about 20mA @ 5 Volts. Windows XP doesn't allow direct access, though with older versions you can use Assembly language. with XP you need to READ ALL OF THESE links and it will tell you what pins on the port you could use and how to program them in different languages. if you read ALL of these links it will give you everything you need to know about the parallel port and how to use it to control your project. It works. I use it to control the movement of motors and turn on indicators. http://www.lvr.com/parport.htm