Witam napisalem programik w Bascom
Nastepnie dodalem do niego:
i mam taki problemik
If Pinb.0 = 0 Then
Portd.0 = 1
Waitms 50
Portd.0 = 0
Waitms 25
to miganie diody w 1 programie miga fajnie a jak dodałem resztę do coś go dusi nie wiem czemu?
Nazwa tematu łamie chyba wszystkie możliwe punkty regulaminu dotyczące tematu. Proszę poprawić!
Robak
Cytat:$regfile = "attiny2313.dat"
$crystal = 4000000
Config Portb = Input
Portb = &B11111111
Config Portd = Output
Portd.0 = 0
Portd.1 = 1
Portd.2 = 0
Do
If Pinb.0 = 0 Then
Portd.0 = 1
Waitms 50
Portd.0 = 0
Waitms 25
End If
If Pinb.1 = 0 And Pinb.0 = 0 Then
Portd.1 = 0
Waitms 10
Portd.1 = 1
Waitms 10
End If
If Pinb.1 = 0 Then
Waitus 100
Portd.2 = 1
End If
If Pinb.2 = 0 Then
Waitms 10
Portd.2 = 0
End If
Loop
End
Nastepnie dodalem do niego:
Cytat:$regfile = "attiny2313.dat"
$crystal = 4000000
Config Portb = Input
Portb = &B11101111
Config Portd = Output
Portd.0 = 0
Portd.1 = 1
Portd.2 = 0
Portd.3 = 0
Portd.4 = 1
Portd.5 = 0
Portd.6 = 0
Do
If Pinb.0 = 0 Then
Portd.0 = 1
Waitms 50
Portd.0 = 0
Waitms 25
End If
If Pinb.1 = 0 And Pinb.0 = 0 Then
Portd.1 = 0
Waitms 10
Portd.1 = 1
Waitms 10
End If
If Pinb.1 = 0 Then
Waitus 100
Portd.2 = 1
End If
If Pinb.2 = 0 Then
Waitms 10
Portd.2 = 0
End If
If Pinb.3 = 1 Then
Portd.3 = 1
Wait 1
Portd.3 = 0
End If
If Pinb.6 = 0 And Pinb.7 = 0 Then
Portd.4 = 1
Waitms 100
Portd.5 = 1
Waitms 200
Portd.5 = 0
Portd.1 = 0
Waitms 100
Portd.1 = 1
Wait 1
Portd.5 = 1
Waitms 100
Portd.5 = 0
Portd.6 = 1
Waitms 100
Portd.6 = 0
End If
If Pinb.4 = 1 Then
Wait 1
Portd.4 = 0
End If
Loop
End
i mam taki problemik
If Pinb.0 = 0 Then
Portd.0 = 1
Waitms 50
Portd.0 = 0
Waitms 25
to miganie diody w 1 programie miga fajnie a jak dodałem resztę do coś go dusi nie wiem czemu?
Nazwa tematu łamie chyba wszystkie możliwe punkty regulaminu dotyczące tematu. Proszę poprawić!
Robak