Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sim
- outputa Alias P0.0
- Outputb Alias P0.2
- Masa Alias P0.1
- P0.1 = 0
- Dim Licznik As Integer
- Licznik = 0
- Dim State As Byte
- Dim Laststate As Byte
- Laststate = Outputa
- Do
- '(State = Pina
- If State <> Laststate Then
- If Pinb <> State Then
- Licznik = Licznik + 1
- Else
- Licznik = Licznik - 1
- End If
- Cls
- Lcd "LICZNIK=" ; Licznik
- End If
- Laststate = State
- If Licznik < 0 Then Licznik = 0
- If Licznik > 25 Then Licznik = 25
- ')
- State = Outputa
- If State <> Laststate Then
- If Outputb <> State Then
- Licznik = Licznik + 1
- Else
- Licznik = Licznik - 1
- End If
- Cls
- Lcd "LICZNIK=" ; Licznik
- End If
- Laststate = State
- Loop
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement