Using Parallel Port for Input
Posted on 1998-08-03
I'm trying to use the parallel port for inputing a couple of switches into a laptop computer. I have a requirement to be completely standalone, running just on the batteries of the laptop. That leaves me with a problem of providing a 5V source to use to hold the input bits high to allow the switch to ground them out and provide the input (this is how I think I'll have to do it). My question is, "Can I use the data bits safely to provide a constant 5V source by holding a logic 1 (or zero as the case may be) on them?" I am planning a load resister of 10k. My plan will be to put the resistor between pins 2(D0) and 11(BSY) and the switch between pin 11 and 18(GND). I'll read the switch input in the BSY bit of the status register. Will this work safely? Thanks.