Control 8 Electrical Devices With Your Parallel Port 48
Michael Williamson writes "A PC parallel port can provide 0 or 5v on 8 pins, individually controllable. This can be used to directly drive LED lights, or with the addition of an external power supply, some switching transistors, and some relays, control 8 higher-powered devices.
I've written a handful of example programs that drive a homemade 8-LED display in amusing ways."
I've just built something like this (Score:4, Interesting)
Nice coding, Tex (Score:3, Funny)
And they say Perl looks like line noise.
Re:Nice coding, Tex (Score:2)
8 Devices? How 'bout 256? (Score:3, Informative)
Re:8 Devices? How 'bout 256? (Score:2)
With a few extra chips (decoders), it would be awfully easy to control 2^8=256 devices.
Wouldn't it be 128? You do need a line to control the chosen device, ie on/off.
Re:8 Devices? How 'bout 256? (Score:2)
Although, it may make more sense to use the 5 control lines as select (limiting you to 32 devices), the 4 low data lines for "instructions", the 4 high data lines for output data, and the 4 input lines for input data.
Of course, then again, I am definitely spending way to many brain cycles on this.......
Re:8 Devices? How 'bout 256? (Score:2)
Re:8 Devices? How 'bout 256? (Score:3, Interesting)
The only hitch is that four of the 5 control lines are inverted (output a 1 and it becomes a ground, 0 and it goes +5v high). But god forbid you should do any logic or anything
You really can't do much with +5v anyway... so you're likely to drive a set of power transistors / relays to switch lights or motors anyway...
Re:8 Devices? How 'bout 256? (Score:2)
Can be done with a serial COM too! (Score:3, Informative)
Re:Can be done with a serial COM too! (Score:2)
USB parport (Score:3, Interesting)
Re:USB parport (Score:1)
Re:USB parport (Score:3, Interesting)
If you look at the data sheet
Re:USB parport (Score:1)
For example, a little robot with a USB connection, a PIC processor to load memory and maybe the same processor to run the robot or perhaps a different one. Plug robot into my Linux box with USB cable. (Appropriate software on Linux box and in robot firmware). Download new robot program through USB, flip a switch and let it run.
Never built any really complicated electron
Re:USB parport (Score:2)
Re:USB parport (Score:2)
It certainly is. If you use the USB scanner driver (which actualy isn't necissarily just for scanners at all) you can write all your control software without having to change kernel code. Your favorite distro almost certainly has the scanner module built already. Personally I find writing a kernel based driver easier (probably because it's what I do for a living and I'm used to it), and you can do that too.
If you want to acce
Re:USB parport (Score:1)
Many usb devices are way more powerful than the commodore, so it shouldn't be too hard at all to make something like it
Maybe there are DIY packages for it already.
It would be nice if I could use all of the expansion port devices I made for the 64 with a modern PC
Coffee (Score:3, Informative)
Wow, this is so recent (Score:2)
I guess it just suprises people when they use an I/O port to do I/O
Also, (Score:1, Informative)
Here's a useful one.. (Score:1)
Disclaimer: I wrote Palace. It used to be based on XPLSISNJASP (can't reach its project page anymore), but most or all of that old code has been ripped out and/or rewritten.
I would love to be able to lit up any LED but (Score:2)
I once tried wiring a led to an AA battery but it didnt do squat, lol.
I wouldnt even know where to get electronics material. There is no radio shack in Portugal
If anyone knows of a fool-proof tutorial on led-play for the utterly clueless dummies like me, I would kill to be able to make a battery-powered led constellation to hang on the wall.
Re:I would love to be able to lit up any LED but (Score:2)
Controlling a parallel port with Perl! (Score:1)
My dear friend and cousin Jerry wrote a nice little Perl Parallel Programming HOWTO [geekinventions.com] for controlling your parallel port with perl.
He has used this to write an interface app for a Bar Monkey type program. Pictures here. [geekinventions.com]
Yet another 'been-done' post (Score:2)
This story is so 1996.
Dupe (Score:2)
Re:Dupe (Score:2)
Is this a slashdot story? (Score:1)
Long time ago, when I was little, I hooked some 5.25" drive stepper motors through a multiplexer to the parallel port and controlled it through a program in slackware. But this was a long time ago.
Now I wonder whats with this news over here? Next week: guess what! A serial port can be connected to another to transfer data!!!
Please keep my slashdot interesting.
Re:Is this a slashdot story? (Score:3, Interesting)
Yes, it is a good /. story.
Believe it or not, there are geeks who've lived only in the software world, and never even picked up a soldering iron (sad but true), but would like to learn a little. A simple electronics project that gives them a taste of the hardware world is just perfect for them.
Do it from Python (Score:2)
I recently wrote a Python C extension for doing just this. It's nice to be able to twiddle bits back and forth realtime from inside the Python interpreter when you're debugging hardware.
Download it here: PyPortIO [ultrasoul.com]
Use it like this:
There's also a good list of links for reading up on more projects there.
How about input? (Score:2)
How about some more basic instructions on how to configure 'input' devices on the parallel port, and then maybe some programming tips (windows and 'nix both) on how to work with them.
Personally, I've been wondering if I could make my own input-device. Maybe a DDR floor panel or something? Or just I/O, with panels that light up as well as sending back info. How about it?
DDR pads are even simpler (Score:1)
Reminds me of the time... (Score:1)
Yippie skippie (Score:1)
Yawn.
Old news but still good value (Score:1)
There is this wonderful connection between the 1's and 0's of software actually appearing as electrical signals with one or the other voltage on them.
I have preferred connecting something to the serial port myself, since that was easier to get working unde
Just finished doing this on a microcontroller (Score:2)
For control, you need a few extra components, but not many. A TIP122 or similar power switching resistor (a cheaper 2N2222 might work, dunno) and a 12V power supply can be used to control dirt-cheap automotive relays. The only (minor) gotcha is you need to hook up a diode in reverse across the coil to stop the back EMF. A 1N4002 connected with t
controlling fans (Score:1)