WF> still won't let me. So has anyone got some example source code, IN BA
WF> that would help me. I would like to INPUT, and OUTPUT to the LPT1: po
You will need to use INP and OUT to do input and output with parallel
port. For example,
def seg=&h40
lpt1=peeki(&h8)
lpt2=peeki(&ha)
lpt3=peeki(&hc)
print hex$(lpt1),hex$(lpt2),hex$(lpt3)
def seg
out lpt1,255
x=inp(lpt1)
the OUT writes to the parallel port, the INP inputs from it. There are
3 total registers for each parallel port. For standard old style
parallel ports (not bi-directional) you will not be able to input from
the data register (the base address). the register at lpt1+1 however
will let you do TTL inputs, only 6 bits though. I have not done any
programming with bi-directional printer ports yet, so dunno if you have
to set bits in registers to use it in bi-directional mode or not, and
haven't seen any good explanations of it yet either. oh, you can use
inp to read from data register on standard ports, but it will just show
you the last data you wrote to it. these pins have latched outputs,
meaning they will hold last data written to them until you write
something else.
I have done a lot of interfacing thru the parallel port: stepper motor
controllers, a/d & d/a circuits, testing TTL logic IC chips, etc. So
what exactly are you trying to do with it? It would help with example
code if we knew what you wanted to do. Eric
--- QM v1.00
---------------
* Origin: Creekside Manor (805) 484-8016 CdCom Support BBS (1:206/2512.0)
|