Dim Port1 As Integer Dim Port2 As Integer Dim Port3 As Integer Private Sub Command1_Click() Port1 = 888 Port2 = 889 Port3 = 890 Timer1.Enabled = True End Sub Private Sub Command2_Click() Port1 = 632 Port2 = 633 Port3 = 634 Timer1.Enabled = True End Sub Private Sub Timer1_Timer() Out Port3, 32 If (Inp(Port1) And 1) = 1 Then Pin1.FillColor = &HFF& If (Inp(Port1) And 1) = 0 Then Pin1.FillColor = &HFF00& If (Inp(Port1) And 2) = 2 Then Pin2.FillColor = &HFF& If (Inp(Port1) And 2) = 0 Then Pin2.FillColor = &HFF00& If (Inp(Port1) And 4) = 4 Then Pin3.FillColor = &HFF& If (Inp(Port1) And 4) = 0 Then Pin3.FillColor = &HFF00& If (Inp(Port1) And 8) = 8 Then Pin4.FillColor = &HFF& If (Inp(Port1) And 8) = 0 Then Pin4.FillColor = &HFF00& If (Inp(Port1) And 16) = 16 Then Pin5.FillColor = &HFF& If (Inp(Port1) And 16) = 0 Then Pin5.FillColor = &HFF00& If (Inp(Port1) And 32) = 32 Then Pin6.FillColor = &HFF& If (Inp(Port1) And 32) = 0 Then Pin6.FillColor = &HFF00& If (Inp(Port1) And 64) = 64 Then Pin7.FillColor = &HFF& If (Inp(Port1) And 64) = 0 Then Pin7.FillColor = &HFF00& If (Inp(Port1) And 128) = 128 Then Pin8.FillColor = &HFF& If (Inp(Port1) And 128) = 0 Then Pin8.FillColor = &HFF00& Out Port3, 34 If (Inp(Port1) And 1) = 1 Then Pin9.FillColor = &HFF& If (Inp(Port1) And 1) = 0 Then Pin9.FillColor = &HFF00& If (Inp(Port1) And 2) = 2 Then Pin10.FillColor = &HFF& If (Inp(Port1) And 2) = 0 Then Pin10.FillColor = &HFF00& If (Inp(Port1) And 4) = 4 Then Pin11.FillColor = &HFF& If (Inp(Port1) And 4) = 0 Then Pin11.FillColor = &HFF00& If (Inp(Port1) And 8) = 8 Then Pin12.FillColor = &HFF& If (Inp(Port1) And 8) = 0 Then Pin12.FillColor = &HFF00& If (Inp(Port1) And 16) = 16 Then Pin13.FillColor = &HFF& If (Inp(Port1) And 16) = 0 Then Pin13.FillColor = &HFF00& If (Inp(Port1) And 32) = 32 Then Pin14.FillColor = &HFF& If (Inp(Port1) And 32) = 0 Then Pin14.FillColor = &HFF00& If (Inp(Port1) And 64) = 64 Then Pin15.FillColor = &HFF& If (Inp(Port1) And 64) = 0 Then Pin15.FillColor = &HFF00& If (Inp(Port1) And 128) = 128 Then Pin16.FillColor = &HFF& If (Inp(Port1) And 128) = 0 Then Pin16.FillColor = &HFF00& Pulse.BackColor = &HFF00& If (Inp(Port2) And 8) = 8 Then Pulse.BackColor = &HFF End Sub 1 2