0% found this document useful (0 votes)
4 views1 page

2nd Program

This document provides a circuit diagram and instructions for using a PC's parallel port to control up to eight electrical appliances or equipment. The circuit uses an opto-coupler to isolate the PC from the relay driver circuitry. Software can send data to the parallel port to turn individual circuits on or off by setting specific bits high or low corresponding to the devices connected to pins 2 through 9. Source code for sample software in C is provided to demonstrate control of the circuits.

Uploaded by

ufone49
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

2nd Program

This document provides a circuit diagram and instructions for using a PC's parallel port to control up to eight electrical appliances or equipment. The circuit uses an opto-coupler to isolate the PC from the relay driver circuitry. Software can send data to the parallel port to turn individual circuits on or off by setting specific bits high or low corresponding to the devices connected to pins 2 through 9. Source code for sample software in C is provided to demonstrate control of the circuits.

Uploaded by

ufone49
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Control electrical appliances using PC Click here for the circuit diagram

Here is a circuit for using the printer port of a PC, for control application using software and some interface hardware. The interface circuit along with the given software can be used with the printer port of any PC for controlling up to eight equipment . The interface circuit shown in the figure is drawn for only one device, being controlled by D0 bit at pin 2 of the 25-pin parallel port. Identical circuits for the remaining data bits D1 through D7 (available at pins 3 through 9) have to be similarly wired. The use of opto-coupler ensures complete isolation of the PC from the relay driver circuitry. Lots of ways to control the hardware can be implemented using software. In C/C++ one can use the outportb(portno,value) function where portno is the parallel port address (usually 378hex for LPT1) and 'value' is the data that is to be sent to the port. For a value=0 all the outputs (D0-D7) are off. For value=1 D0 is ON, value=2 D1 is ON, value=4, D2 is ON and so on. eg. If value=29(decimal) = 00011101(binary) ->D0,D2,D3,D4 are ON and the rest are OFF. Click here for the sample software. Click here for the source code of the software (in C).

You might also like