[PD] parport object (linux only)

Christian Klippel ck at mamalala.de
Sat Jan 26 00:27:25 CET 2002


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 -

-- 
visit me:
http://mamalala.de - jmax audio related
http://video.mamalala.de - jmax video related
irc.openprojects.net - channel #jmax



More information about the Pd-list mailing list