Hello!
I wanted to have the cheapest possible foot switch I can get. And I dodn't want to settle with just one. The easiest way was to hook tje switches to the parallel port.
It only works with parallel ports that can make use od bidirectional data read/write (EPP mode). And you need ppdev kernel module.
The hardware is very simple. The data pins (2 through 9) on parport are pulled high and the reading on the pin is 1. By connecting a pin to the GND (pins 18 through 25 are all 0V) the reading of the pin is 0.
+---+---+---+---+---+---+---+------ pin 18..25 (GND) | | | | | | | | sw1 sw2 sw3 sw4 sw5 sw6 sw7 sw8 | | | | | | | | | | | | | | | +------ pin 9 (D7) | | | | | | +---------- pin 8 (D6) | | | | | +-------------- pin 7 (D5) | | | | +------------------ pin 6 (D4) | | | +---------------------- pin 5 (D3) | | +-------------------------- pin 4 (D2) | +------------------------------ pin 3 (D1) +---------------------------------- pin 2 (D0)
Included is parport.c and parport.pd if anybody wants to try them out. Sending 1 or 0 to the parport starts / stops periodic reading of the /dev/parport0.
It's only my first pd external and would be happy to get any suggestions.
Take care,
Miha...
hi miha,
nice that other people discover the parport as an inexpensive i/o facility too .... but, there is one thing you should note : never, i repeat, _never_ use anything unbuffered to hook on that port. a little static electricity while plugging in or out something (esp. here : footswitches) can immediatly kill your parport ! i know about that because i have made many designs using that port, the last public one is a a/d input box, similar to that icube thing, but muuuch more ports and way cheaper.
use simple AND gates to buffer the data lines, for example. they are cheap, a few cents each, and its worth doing it. you can take the +5v to operate that ic from the parport itself, just switch the 4 outgoing status lines high and use that as power for the buffer ic's.....
another thing with long cables and no buffering can be unstable input readings. thats because there is no defined level (low or high) on the data lines, and not all parport implementations have them internally .... so you can get "sudden jumps" between 0 and 1 if you have long cables (esp. in live situations where you have lots of electrical noise around you : light switching, the amps, etc ...) solution: tie _all_ 8 incomming datalines via a 10kohm resistor to gnd. then use +5v to trigger a particular line high. this way you always have defined 0 when nothing is connected ....
just my few notes, hopefully helpfull ;-)
chris
Am Freitag, 25. Januar 2002 21:21 schrieb Miha Tomšiè:
Hello!
I wanted to have the cheapest possible foot switch I can get. And I dodn't want to settle with just one. The easiest way was to hook tje switches to the parallel port.
It only works with parallel ports that can make use od bidirectional data read/write (EPP mode). And you need ppdev kernel module.
The hardware is very simple. The data pins (2 through 9) on parport are pulled high and the reading on the pin is 1. By connecting a pin to the GND (pins 18 through 25 are all 0V) the reading of the pin is 0.
+---+---+---+---+---+---+---+------ pin 18..25 (GND)
sw1 sw2 sw3 sw4 sw5 sw6 sw7 sw8
| | | | | | | +------ pin 9 (D7) | | | | | | | | | | | | +---------- pin 8 (D6) | | | | | | | | | | +-------------- pin 7 (D5) | | | | | | | | +------------------ pin 6 (D4) | | | | | | +---------------------- pin 5 (D3) | | | | +-------------------------- pin 4 (D2) | | +------------------------------ pin 3 (D1)
+---------------------------------- pin 2 (D0)
Included is parport.c and parport.pd if anybody wants to try them out. Sending 1 or 0 to the parport starts / stops periodic reading of the /dev/parport0.
It's only my first pd external and would be happy to get any suggestions.
Take care,
Miha...
- Miha Tomšiè --- C. na postajo 55 -- SI-1351 Brezovica pri Lj. ---
SLOVENIA -
On Sat, 26 Jan 2002, Christian Klippel wrote:
i know about that because i have made many designs using that port, the last public one is a a/d input box, similar to that icube thing, but muuuch more ports and way cheaper.
Is that public as in the specs/instructions are available? (oh please...)
DC
www.ariada.uea.ac.uk/~dcasal --)+
hi,
i would also be interested in some scematics of that cheap A/D.
there is a cheap device by ELV approx 26 euros. go at www.elv.at (or whatever country the have the shop too) check out " RS 232 Messmodul "in the hard/software section at their online shop.
it has 6 analog in / 10 bit resolution but only 6 convertions / sec. and additional 8 digital I/O s.
another way for cheap but not very accurate A/D converting is to use the joystick port with the joystick object, and make some "analog joystick circuit" get some info at http://www.epanorama.net/documents/joystick/index.html
cheers
erich
On Sat, 26 Jan 2002, marco wrote:
Is this design on-line?
i know about that because i have made many designs using that port, the last public one is a a/d input box, similar to that icube thing, but muuuch more ports and way cheaper.
hia ll,
ok, here it is (since a long time ;-)
http://mamalala.de/files/electronic.html
for the germans : please note that i didnt found a supplier for the tlc ic (buerklin doesnt heve them)
its a rather simple design, one basic board that connects to the pc (soon with usb, i promise !) and on that board you hook up to 8 ad-boards, each with 11 channels a 10 bit resolution.
the "driver" object is for jmax, but shouldnt be a problem to make it a pd one ....
greets,
chris
Am Samstag, 26. Januar 2002 16:25 schrieb marco:
Is this design on-line?
i know about that because i have made many designs using that port, the last public one is a a/d input box, similar to that icube thing, but muuuch more ports and way cheaper.