Mit rontottam el? Az egészet?
Kód: Egész kijelölése
$regfile = "ATtiny2313.dat"
$crystal = 4000000
Config Portd.3 = Output
Config Portd.4 = Output
Config Portd.5 = Output
Config Portb.0 = Input
Config Portb.1 = Input
Portb.0 = 1
Portb.1 = 1
Zold Alias Portd.5
Sarga Alias Portd.4
Piros Alias Portd.3
Do
If Pinb.0 = 0 Then
Waitms 50
If Pinb.0 = 0 Then
Gosub Led1
End If
If Pinb.1 = 0 Then
Waitms 50
If Pinb.1 = 0 Then
Gosub Led2
End If
Loop
Led1:
Do
Set Zold
Reset Sarga
Reset Piros
Wait 1
Reset Zold
Set Sarga
Reset Piros
Wait 1
Reset Zold
Reset Sarga
Set Piros
Wait 1
Reset Zold
Set Sarga
Set Piros
Wait 1
End If
Pinb.0 = 1
Loop
Return
Led2:
Do
Reset Zold
Reset Sarga
Set Piros
Wait 1
Reset Piros
Wait 1
End If
Pinb.1 = 1
Loop
Return