Maker Pro
Maker Pro

Parallel Port and VB part II

Z

Zucker

Jan 1, 1970
0
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 (http://www.logix4u.net/parallelport1.htm) 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.
Steve
 
R

Rich Grise

Jan 1, 1970
0
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 (http://www.logix4u.net/parallelport1.htm) 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.

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!
Rich
 
M

mike

Jan 1, 1970
0
Zucker said:
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?

float 'em.
This website (http://www.logix4u.net/parallelport1.htm) 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.

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 ;-(
mike
Thanks again for your help.
Steve



--
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.
MAKE THE OBVIOUS CHANGES TO THE LINK
ht<removethis>tp://www.geocities.com/SiliconValley/Monitor/4710/
 
T

Thot

Jan 1, 1970
0
Steve,

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
them.

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

Good luck


Luca
 
Top