Results 1 to 5 of 5

Thread: Reading in Bytes from Parlel port

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Location
    England
    Posts
    94

    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.

  2. #2
    Guest
    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.

  3. #3
    Guest
    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

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2000
    Location
    England
    Posts
    94
    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]

  5. #5
    Fanatic Member
    Join Date
    Feb 2000
    Location
    The Netherlands
    Posts
    715
    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
  •  



Click Here to Expand Forum to Full Width