Connect with us

Parallel Port and VB part II

Discussion in 'Electronic Basics' started by Zucker, Apr 22, 2005.

Scroll to continue with content
  1. Zucker

    Zucker Guest

    First, I would like to thank everyone who helped me with my initial post.
    Using your suggestions, I decided to use a third party dll (inpout32.dll) to
    access the parallel port using VB6.

    My next question is...if I'm only interested in using the eight data pins of
    the parallel port, what do I do with the status and control pins? Do I tie
    them to Vcc or Ground? Can I leave them floating?

    This website ( states that the port
    must be set to bidirectional mode before the data pins can be read into a VB
    application. At the bottom of the page it states "To enable Biirectional
    data transfer just set the "Bidirectional" bit (bit 5) in control register.
    This is done by writing 32 to control register." Writing 32 to the control
    register is done with VB code. I'm worried that any external hookup to the
    control pins would conflict with the VB code.

    Thanks again for your help.
  2. Rich Grise

    Rich Grise Guest

    Then, don't connect anything to it on the outside. Leaving them open
    should be fine, unless you want to use them for handshaking.

    Good Luck!
  3. mike

    mike Guest

    float 'em.
    This is a problem with bidirectional parallel port. I always use series
    resistors with value high enough to limit the fault current to a safe
    value. Often there's a conflict between desired output drive current
    and protection. And we haven't even talked about static protection.
    You always want to use a plug-in parallel port card.
    Remember that on a motherboard, the parallel port circuitry is in a chip
    with a LOT of other stuff. Smoking the port can render your motherboard
    DEAD!! Ask me how I know ;-(

    Return address is VALID but some sites block emails
    with links. Delete this sig when replying.
    Wanted, PCMCIA SCSI Card for HP m820 CDRW.
    FS 500MHz Tek DSOscilloscope TDS540 Make Offer
    Wanted, 12.1" LCD for Gateway Solo 5300. Samsung LT121SU-121
    Wanted 12" LCD for Compaq Armada 7770MT.
    Bunch of stuff For Sale and Wanted at the link below.
  4. Thot

    Thot Guest


    I use Inpout32.dll with Visual Basic myself.
    I use the 5 status bits for input and the 8 Data Bits for output.
    I would not expect any problem from setting C5 high:

    Out base_address +2, 32

    And I would leave the unused pins floating for sake of simplicity.
    If you leave them alone they would have value 1 and if you connect them to
    ground they will have value 0, which is irrelevant since you are not using

    I have limited experience beyond that. So far I have written a small VB
    program to test the paralle port test circuit on and
    another to drive an A/D interface via parallel port.

    Good luck

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day