D
<p>Dear all,
<p>I have created an application using Microsoft Excel which will allow me to use my PC's parallel port.
<p>I have downloaded inpout32 and placed it in my windows/system folder. I have typed the following code into a separate module:
<pre>
Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) _
As Integer
Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _
(ByVal PortAddress As Integer, _
ByVal Value As Integer)
</pre>
<p>using a simple command like "out 888, number" I am able to output any bit pattern I wish. However I am having problems reading the inputs.
<p>I understand the command is inp(888) and indeed if I was to output a bit pattern and then use the above command I am able to get a correct reading. The problem arises when I use external circuitry to supply the digital inputs to the port. Even something as simple as connecting a 5v powersupply to the port does not seem to work.
<p>Any help on this matter would be GREATLY appreciated.
<p>Many thanks.
<p>I have created an application using Microsoft Excel which will allow me to use my PC's parallel port.
<p>I have downloaded inpout32 and placed it in my windows/system folder. I have typed the following code into a separate module:
<pre>
Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" _
(ByVal PortAddress As Integer) _
As Integer
Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" _
(ByVal PortAddress As Integer, _
ByVal Value As Integer)
</pre>
<p>using a simple command like "out 888, number" I am able to output any bit pattern I wish. However I am having problems reading the inputs.
<p>I understand the command is inp(888) and indeed if I was to output a bit pattern and then use the above command I am able to get a correct reading. The problem arises when I use external circuitry to supply the digital inputs to the port. Even something as simple as connecting a 5v powersupply to the port does not seem to work.
<p>Any help on this matter would be GREATLY appreciated.
<p>Many thanks.