I need to control some relays via parallel port data pins.I am looking for the simpliest circuit for that and a sample program in C for Linux or for windows xp or above.Are there any?
You may find this article illuminating: http://www.codeproject.com/KB/cs/csppleds.aspx . It deals with controlling LEDs with parallel port.
Here's an example of a relay driver circuit. The choice of an NPN transistor depends on coil current that your relay requires. Post the model of the relay you're planning to use, and I'll help you pick a transistor.
So, if you replace LEDs in the CodeProject article with relay driver circuits (or hook them up in parallel), you'll be able to control relays via parallel port. You can also find ready-made hardware if you look-up parallel port relay board .
protected by Kortuk Sep 10 '13 at 6:30
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?