Are you able to write to the port and see the data outputs change?
Here is a VB.NET program that will display the status, control, and data registers continuously. Be sure to edit it for the base address of your parallel card.
The status inputs have pullup resistors, so shorting one of them to ground should show a change.
Some ports will do the same with the control lines.
Note that some signals are inverted so they show 0 when pulled high, and will change to 1 when grounded.
Should look like the attached screen capture when idle.
Option Strict On
Imports System.Runtime.InteropServices
Imports System.Threading
Module Module1
<DllImport("kernel32.dll")> Public Function LoadLibrary(ByVal name As String) As IntPtr
End Function
<DllImport("kernel32.dll")> Public Function FreeLibrary(ByVal handle As IntPtr) As Boolean
End Function
<DllImport("kernel32.dll")> Public Function GetProcAddress(ByVal handle As IntPtr, ByVal name As String) As IntPtr
End Function
<UnmanagedFunctionPointer(CallingConvention.StdCall)>
Delegate Function InitializeWinIoType() As Boolean
<UnmanagedFunctionPointer(CallingConvention.StdCall)>
Delegate Sub ShutdownWinIoType()
<UnmanagedFunctionPointer(CallingConvention.StdCall)>
Delegate Function GetPortValType(ByVal PortAddr As UInt16, ByRef pPortVal As UInt32, ByVal Size As Byte) As Boolean
<UnmanagedFunctionPointer(CallingConvention.StdCall)>
Delegate Function SetPortValType(ByVal PortAddr As UInt16, ByVal pPortVal As UInt32, ByVal Size As Byte) As Boolean
Sub Main()
Console.WriteLine("{0} bit", IntPtr.Size * 8)
Dim winio As IntPtr
If IntPtr.Size = 4 Then
winio = LoadLibrary("WinIo32.dll")
ElseIf IntPtr.Size = 8 Then
winio = LoadLibrary("WinIo64.dll")
Else
Console.WriteLine("Unsupported system")
Exit Sub
End If
Console.WriteLine("WinIo DLL Module Handle: {0:X}", winio)
If winio = IntPtr.Zero Then
Console.WriteLine("WinIo library could not be loaded")
Exit Sub
End If
Dim fp As IntPtr
fp = GetProcAddress(winio, "InitializeWinIo")
If fp = IntPtr.Zero Then
Console.WriteLine("Could not get address of InitializeWinIo")
FreeLibrary(winio)
Exit Sub
End If
Dim InitializeWinIo As InitializeWinIoType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(InitializeWinIoType)), InitializeWinIoType)
fp = GetProcAddress(winio, "ShutdownWinIo")
If fp = IntPtr.Zero Then
Console.WriteLine("Could not get address of ShutdownWinIo")
FreeLibrary(winio)
Exit Sub
End If
Dim ShutdownWinIo As ShutdownWinIoType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(ShutdownWinIoType)), ShutdownWinIoType)
fp = GetProcAddress(winio, "GetPortVal")
If fp = IntPtr.Zero Then
Console.WriteLine("Could not get address of GetPortVal")
FreeLibrary(winio)
Exit Sub
End If
Dim GetPortVal As GetPortValType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(GetPortValType)), GetPortValType)
fp = GetProcAddress(winio, "SetPortVal")
If fp = IntPtr.Zero Then
Console.WriteLine("Could not get address of SetPortVal")
FreeLibrary(winio)
Exit Sub
End If
Dim SetPortVal As SetPortValType = DirectCast(Marshal.GetDelegateForFunctionPointer(fp, GetType(SetPortValType)), SetPortValType)
If Not InitializeWinIo() Then
Console.WriteLine("Error initializing WinIo driver")
FreeLibrary(winio)
Exit Sub
End If
Const port_base As UInt32 = &HD880
Const data_port As UInt32 = port_base + 0
Const status_port As UInt32 = port_base + 1
Const control_port As UInt32 = port_base + 2
SetPortVal(control_port, &H4, 1)
Console.Clear()
Console.SetCursorPosition(0, 0)
Console.WriteLine("S7 S6 S5 S4 S3 C3 C2 C1 C0 D7 D6 D5 D4 D3 D2 D1 D0 Register Bits")
Console.WriteLine("11 10 12 13 15 17 16 14 1 9 8 7 6 5 4 3 2 DB25 Pins")
Do
Dim status As UInt32
Dim control As UInt32
Dim data As UInt32
GetPortVal(status_port, status, 1)
GetPortVal(control_port, control, 1)
GetPortVal(data_port, data, 1)
Console.SetCursorPosition(0, 2)
Console.WriteLine(" {0} {1} {2} {3} {4} {5} {6} {7} {8} {9} {10} {11} {12} {13} {14} {15} {16}", _
(status >> 7) And 1, _
(status >> 6) And 1, _
(status >> 5) And 1, _
(status >> 4) And 1, _
(status >> 3) And 1, _
(control >> 3) And 1, _
(control >> 2) And 1, _
(control >> 1) And 1, _
control And 1, _
(data >> 7) And 1, _
(data >> 6) And 1, _
(data >> 5) And 1, _
(data >> 4) And 1, _
(data >> 3) And 1, _
(data >> 2) And 1, _
(data >> 1) And 1, _
data And 1)
Thread.Sleep(20)
Loop While Not Console.KeyAvailable
Console.ReadKey()
ShutdownWinIo()
FreeLibrary(winio)
End Sub
End Module