|
-
Sep 22nd, 2000, 06:18 PM
#1
Thread Starter
Lively Member
Read in inputs on LPT port
I need some help
I have put together a electronic circuit which gives you 8 inputs by following instructions in a book i bought called "Easy PC Interfacing" unfortunatly all the software to read in the data is written in Qbasic in the book which is useless for what i want to do.
The Code in the book uses
Out &H37A
INP (&H379)
to read in data from the hex addresses of the inputs. I was wondering if their is anyway of doing this in VB.
-
Sep 22nd, 2000, 06:24 PM
#2
i think i might have something that can help, but i need you to hang on for a coupla days or so, cause i kinda forgot the name of the .dll you'll be needing.
then you'll have to declare a function in your code using that .dll as your lib.
but first i gotta get the name of that .dll. so i guess the answer to your question is yes, that can be done in VB.
-
Sep 22nd, 2000, 07:43 PM
#3
There are freeware DLLs at http://www.lvr.com/parport that give you access to the parallel port. The one you would want to use is http://www.lvr.com/files/inpout32.zip , it is the same as the INP and OUT commands in QBasic.
Sunny
-
Sep 23rd, 2000, 06:15 AM
#4
Thread Starter
Lively Member
Thanks guys i am well on my way to fixing the problem.
Although i have come up with a second problem when using this dll it will read in the bytes no problem it's just if i want to detect an input i need to run a loop that continuously checks the inputs but in doing this it james the program and so nothing else can be done. Is there anyway of getting VB to detect the interrupt from the port because i think this might solve the problem.
Thanks Again
Peter
"Let's all join forces, rule with an iron hand...and prove to all the world, metal rules the land..."
-- Judas Priest
My email is [email protected]
-
Sep 23rd, 2000, 06:51 AM
#5
Fanatic Member
You can solve the problem, by putting a DoEvents command in the loop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|