Port Parallel dengan VB6
Port Parallel dengan DB 25 dijalankan dengan program VB dengn memfungsikan Led sebagi indaktor. berikut scrib visual basicny
;
1. Download file IO Simpan Windows/system32
2. download parmon.exe
3. jalankan visul basic v.6
4.buat script pada modul
Public Declare Sub PortOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Byte)
Public
Declare Sub PortWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Integer)
Public
Declare Sub PortDWordOut Lib "IO.DLL" (ByVal Port As Integer, ByVal Data As Long)
Public
Declare Function PortIn Lib "IO.DLL" (ByVal Port As Integer) As Byte
Public
Declare Function PortDWordIn Lib "IO.DLL" (ByVal Port As Integer) As Long
Public
Declare Sub SetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Public
Declare Sub ClrPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Public
Declare Sub NotPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte)
Public
Declare Function GetPortBit Lib "IO.DLL" (ByVal Port As Integer, ByVal Bit As Byte) As Boolean
Public
Declare Function RightPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Public
Declare Function LeftPortShift Lib "IO.DLL" (ByVal Port As Integer, ByVal Val As Boolean) As Boolean
Public
Declare Function IsDriverInstalled Lib "IO.DLL" () As
Boolean
5. buat form seperti;
Private Sub Command1_Click() ' bit 0 on 1
PortOut 888, 1
End Sub
Private Sub Command2_Click() ' bit 1 on 1
PortOut 888, 2
End Sub
Private Sub Command3_Click() ' bit 2 on 1
PortOut 888, 4
End Sub
Private Sub Command4_Click() ' bit 3 on 1
PortOut 888, 8
End Sub
Private Sub Command5_Click() ' bit 4 on 1
PortOut 888, 16
End Sub
Private Sub Command6_Click() ' bit 5 on 1
PortOut 888, 32
End Sub
Private Sub Command7_Click() ' bit 6 on 1
PortOut 888, 64
End Sub
Private Sub Command8_Click() ' bit 7 on 1
PortOut 888, 128
End Sub
Private Sub Command9_Click() ' D0 up to D7 off (0)
PortOut 888, 0
End Sub
Private Sub Command10_Click() 'D0 up to D7 on (1)
PortOut 888, 255
End Sub
5.sve sebi port dengn extension .exe