Need Help With PC Hardware Interface Project.

I've had an idea for a PC hardware interface rolling around in my head for a while, but after doing some inital investigation on the web, I have not found anything that has helped me get started yet.

It basically goes like this...

I have a series of 256 momentary switches. I need to wire these switches somehow, and interface them with a standard off-the-shelf PC (Parallel interface???), and produce an 8-bit number from 0 to 255 (depending on which switch is pressed). This number should be something that I could pick up using VB)

So, my questions are...

  1. Is this even possible?
  2. Is there a ready made device that an do this?
  3. Are there plans for a device that can do something similar to this?

Thanks! ferrell

Reply to
ferrellcat
Loading thread data ...

Sure. There's a number of ways. I would go for a row-column encoder (16 x 16) with a simple controller that can also do priority encoding (see below)

Probably

It's not that difficult to do in the first place.

One of the issues you will face is - what happens if more than one switch is pressed? What should the system do? There are 4 choices:

a. Report all closed switches b. Suppress all reports if more than one switch pressed c. Report the 'highest' pressed switch d. Report the lowest pressed switch

b,c and d are trivial to implement. a is harder, but eminently do-able.

Interfacing to a standard PC can be done in a number of ways. The easiest for me would be to use a serial port and some predefined data protocol. I am sure VB can do that (although I have avoided it like the plague, a boss of mine insisted it be used, so I wrote C backend DLLs for it instead).

If you do that, your circuit will need a RS232 level converter (you could even get the power to drive your circuit from the port if you don't need very much).

You're welcome

Cheers

PeteS

Reply to
PeteS

I've been avoiding this question, because it really belongs in .basics. In fact, I've crossposted this reply.

Learn how to use the parallel port, and then just make one 8-bit output port, one 8-bit input port, and put the switches in a crosspoint matrix.

Wait a minute, that's only 64. OK, 16 bits of output, and 16 bits of input.

That's still not hard.

Nobody's going to do that homework for you, but you can get hundreds of google hits on stuff like "parallel port interfacing" and such.

There are so many ways to do this, it'd take all day to describe them. a couple of 74x138 and one ea. 74x154 could do it, with a little software smarts.

Good Luck! Rich

Reply to
Rich Grise

Make you mind up!

yes.

Keyboard ("I need to wire these switches somehow," ) or Analogue to Digital Converter ("I have a series of 256 momentary switches") connect different resistors in parallel with each switch, measure current.

Probably, once you decide what "this" is!

Reply to
Frithiof Andreas Jensen

Also, just remember that with newer versions of Windows (NT, XP, 2K), you no longer have direct access to the parallel port unless you run a special ring 0 driver like GiveIO. Not needed with Win9x or earlier.

Best regards,

Bob Masta dqatechATdaqartaDOTcom D A Q A R T A Data AcQuisition And Real-Time Analysis

formatting link
Home of DaqGen, the FREEWARE signal generator

Reply to
Bob Masta

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.