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!
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
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