PC Peripherals infrared sensors as input to parallel port

Hi...We have been working on our final year project and we need a little help regarding certain topics ....

1 . How do we connect infrared sensors to parallel port ... i mean how do we get the input through the parallel port . ( We have knowledge about connecting LEDs to parallel port but we fail on this subject )

2. Can we write a program on Java for the same .

your replies awaited
TAI

(desperate Engineer)
 
if you are using winxp or above, you will fitst need to open the parallel port..
use a simple program called userport.

the address of the 8 bit data port is 0x378
the next 2 ports are control and status - 0x379 and 0x37A...do check the order, i dont remember which is which

you will have to designate the data port as input by writing an appropriate word to the control port..

once designated as an input port, all pins of the data port will be driven high..

to give an input to the port, the required pins need to be pulled low..

you will have to build a small circuit around your sensors using transistors to pull the data pin low whenever the sensor is activated by IR light..

hope this helps
p.s.
I dont know java, but in C commands inportb and outportb are used for I/O
 
Back
Top