Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Uklad nawrotny, program napisal: Kamil Nowinski
- 'enjoy
- '-----------------------------------------------
- $regfile = "m8def.dat"
- $crystal = 8000000
- Config Portd = Output
- Config Portb = Input
- Portd = &B00000000
- Portb = &B00000000
- 'S1 - Dioda1
- 'S2 - Dioda2
- 'S3 - STOP (przerwanie)
- S1 Alias Portb.0
- S2 Alias Portb.1
- S3 Alias Portb.2
- Dioda1 Alias Portd.0
- Dioda2 Alias Portd.1
- Dim Stan1 As Bit
- Stan1 = 1
- Do
- If S1 = Stan1 Then
- Gosub Zarowka1
- Elseif S2 = Stan1 Then
- Gosub Zarowka2
- Else
- Dioda1 = 0
- Dioda2 = 0
- End If
- Loop
- End
- Zarowka1:
- Do
- Dioda1 = Stan1
- Dioda2 = 0
- If S1 = 0 And S3 = 1 Then Return
- Loop
- End
- Zarowka2:
- Do
- Dioda2 = Stan1
- Dioda1 = 0
- If S2 = 0 And S3 = 1 Then Return
- Loop
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement