first the value of the control lines were 204 so i tried to set the 5th bit by using the out function by using "out 890,32" which 32 will set the fifth bit but when i try to read the value i get 192!!! i dont know why , i cant use the data lines . i dont know if i done something wrong this is my code
Private Declare Function Inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal PortAddress As Integer) As Integer
Private Declare Sub Out Lib "inpout32.dll" _
Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Dim x As Byte
Out 890, 32
x = Inp(890)
Label1.Caption = x
End Sub
Private Sub Form_Load()
Label1.Caption = Inp(890)
End Sub
regards,
romaihi