Posts: 273
Threads: 51
Joined: May 2002
Any documentation out there on parallel port programming? Which ports or addresses needed to access certain pins in other words...Thank you
Posts: 3,616
Threads: 287
Joined: Jan 2003
Ports? INP, OUT? Can't you just use "OPEN LPT1.." or something? I'm pretty sure it isn't only for files and COM ports.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 273
Threads: 51
Joined: May 2002
i know, but I need to be able to read certain pins for incoming signals
Posts: 3,616
Threads: 287
Joined: Jan 2003
Can't help ya. =/ I know nothing about that...sorry.
f only life let you press CTRL-Z.
--------------------------------------
Freebasic is like QB, except it doesn't suck.
Posts: 137
Threads: 9
Joined: Feb 2004
Do you want the printer return code? Or are you looking for more precision, like a value for each pin?
I have code and a port number for the printer return code around here somewhere, and if I can't find it I know Dale has it too...
Jonathan Simpson
onathan Simpson
Posts: 273
Threads: 51
Joined: May 2002
more like a specific binary value for each pin so I can have a function behaving like this:
Pin12% = GetPinStatus%(12)
I'm trying to connect multiple joysticks to the parallel port.
Posts: 137
Threads: 9
Joined: Feb 2004
Well, if you can figure out which pins the return value comes in on, you should be able to get the binary value of each pin from that... would that suffice?
Jonathan Simpson
onathan Simpson
Posts: 4,307
Threads: 63
Joined: May 2003
Yeah once he has the binary values at each port he can simply check the state of the individual bits =P.
Posts: 273
Threads: 51
Joined: May 2002
Yeah that would do. But I need to know where to look for signals. I've never toyed with ports, so I'm sort of new at this. I know I need to get this info from a certain port number or memory address, but what is that address? Plus the address of every pin?
Posts: 137
Threads: 9
Joined: Feb 2004
Code:
DO
LOCATE 1,1: PRINT INP(889)
LOCATE 2,1: PRINT INP(633)
LOOP
That should about do it. Now you just need to find the pins.
To find out which port to use, plug in a printer and turn it on/off and watch which values change.
Jonathan Simpson
ps: you reaaaaally don't want to know how I found those
onathan Simpson