Evo npr. ovako:
Code:
Private StanjeLPTPorta As Integer
Private PortID As String = 378 'Najčešće je lpt1
Private Sub PaliDiodu(ByVal KojuDiodu as Integer)
StanjeLPTPorta = StanjeLPTPorta Or (2 ^ (KojuDiodu - 1))
Out(Val("&H" & PortID), StanjeLPTPorta)
End Sub
Private Sub GasiDiodu(ByVal KojuDiodu as Integer)
StanjeLPTPorta = StanjeLPTPorta And (255 - (2 ^ (KojuDiodu - 1)))
Out(Val("&H" & PortID), StanjeLPTPorta)
End Sub
Public Sub GasiSve()
StanjeLPTPorta = &H0
Out(Val("&H" & PortID), StanjeLPTPorta)
End Sub
Public Sub PaliSve()
StanjeLPTPorta = &HFF
Out(Val("&H" & PortID), StanjeLPTPorta)
End Sub
I koristi malo više Google. Sve može da se pronađe veoma lako. Mada je najlakše kad neko to uradi umesto tebe.