Control 8 Electrical Devices With Your Parallel Port
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 got a relay kit from Carl's Electronics which switches 8 relays and works brilliantly. Great fun!
value = pin[0]*1 + pin[1]*2 + pin[2]*4 + pin[3]*8 + pin[4]*16 + pin[5]*32 + pin[6]*64 + pin[7]*128;
And they say Perl looks like line noise.
I have been pwned because my
With a few extra chips (decoders), it would be awfully easy to control 2^8=256 devices. Note that I said "control", and not "drive". You will definitely need some external power to drive this....
10b||~10b -- aah, what a question!
Take a diagram like this and add another line of FF on the outputs to mask the output while shifting... (say, DTR will shut them keep/thru, RTS to strobe... use CTS on a dead FF or buffer to sync for propagation delays) Heh, can you buy FF sticks anymore? it would be fun to play with...
Mi domando chi à il mandante di tutte le cazzate che faccio - Altan
I can't belive people are still using the parallel port. I just finished my first project using USB for my interface, and it was pretty easy overall. I guess not as easy as using the parallel port, but then again I can control 127 USB devices, and each one could be controlling an arbitrary number of other devices. I would like to see some decent USB experimentation products and drivers out there. Maybe I'll hear my own calling.
-73, de n1ywb
www.n1ywb.com
There has been a HOWTO for controlling an automatic drip coffee machine for years using your legacy paraport. See Coffee HOWTO.
I used Microchip's USB PICs. They'll send you free samples, although you'll need to be able to program them somehow. I won't go into the details of getting started in PIC programming, you can google for that and find 1000 pages. They supply USB firmware, which is pretty easy to use. Just define your descriptors (this will require reading parts of the USB spec), and then put copy your data into a buffer and put the number of bytes in W and call their library routine. Data sent.
If you look at the data sheet for the PIC 16c745 and 16c765, you'll find schematics. It's damn simple, you add a cap and a resistor and a USB connector and the thing powers itself off the bus.
-73, de n1ywb
www.n1ywb.com
How about 13 with no extra hardware at all? Standard parallel port (and by "standard" I mean the all the way down to ye olde 8086 machines) have 8 data, 5 control and 4 status (input) pins.
:)
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... which requires extra power.
=Smidge=
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.
Tom Swiss | the infamous tms | my blog
You cannot wash away blood with blood