Notes on reading a switch position (a physical switch in the real world) using pin 10:
Shorting pin 10 to pin 25 (with a resistor preferably) will change a signal from True (in python) to False. In python using i=getInAcknowledge() I can get i, a variable, to be true or false as I stick a wire between pins 25 and 10 (but use a resistor). Using a variable resistor I determined that about 3500 to 4000 ohms should work. This fits the circuits you see on the web that recommend - usually 3.7 K ohms. Would using no resistor burn out the port? Hmmm, well pin 11 went a bit flakey when I tried it. I may have damaged the pin 11 line because now it always reads False. I did try pin 10 with no resistor for just an instant and no damage was done. I'll install a resistor, though.
Pin 10 is nACK and in not inverted according to web sources
The link to python info is here:
http://pyserial.sourceforge.net/pyparallel.html#examples.
Here is some of the info:
setData(value)
Apply the given byte to the data pins of the parallel port.
setDataStrobe(level)
Set the “data strobe” line to the given state.
setAutoFeed(level)
Set “auto feed” line to given state.
setInitOut(level)
Set “initialize” line to given state.
getInSelected()
Read level of “select” line.
getInPaperOut()
Read level of “paper out” line.
getInAcknowledge()
Read level of “Acknowledge” line. - so this is my pin 10.
Here is a pinout:
. .
The pinout came from http://www.probotix.com/manuals/PBX-2_manual.htm
And it looks like they sell a Breakout Board solution so you would not need to fool around with much electronics when interfacing the parallel port. I wanted to learn more about electronics, so I built my own circuits.
Model: PBX-2
Breakout Board Specs:
* DB25 Female
* All Pins Brought Out
* Jumper Enabled Input Pull-up Resistors
* Integrated 5V Logic Supply Regulator
* PROBOTIX Pinheader & Screw Clamp Terminals
* Experimental USB Powered Logic Supply