Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
parallel port specs...
#1
Any documentation out there on parallel port programming? Which ports or addresses needed to access certain pins in other words...Thank you Smile
Reply
#2
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.
Reply
#3
i know, but I need to be able to read certain pins for incoming signals
Reply
#4
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.
Reply
#5
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
Reply
#6
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.
Reply
#7
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
Reply
#8
Yeah once he has the binary values at each port he can simply check the state of the individual bits =P.
Reply
#9
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?
Reply
#10
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 Smile
onathan Simpson
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)