Witam
Zrobiłem pierwszy program do migania ledem.
Postanowiłem pójść kroczek dalej i zachciało mi się migać 6-oma ledami
No i ściana. Bo albo nie świeci żadna albo święcą ciągle wszystkie razem
Chodziło mi o tego typu mruganie ledami:
tak podpięte :
a tu zamieszczam kod w Bascomie
Kombinowałem jeszcze w ten sposób ale też nic z tego
Prosiłbym o pomoc bo dla mnie ten kod wydaje się być logiczny
Zrobiłem pierwszy program do migania ledem.
Postanowiłem pójść kroczek dalej i zachciało mi się migać 6-oma ledami
No i ściana. Bo albo nie świeci żadna albo święcą ciągle wszystkie razem
Chodziło mi o tego typu mruganie ledami:
tak podpięte :
a tu zamieszczam kod w Bascomie
$regfile = "m8def.dat"
$crystal = 1000000
Config Portb = Output 'portb jako wyjscie
Config Portd = Output 'portd jako wyjscie
Do
Set Pinb.2
Wait 1
Reset Pinb.2
Set Pinb.1
Wait 1
Reset Pinb.1
Set Pinb.0
Wait 1
Reset Pinb.0
Set Pind.7
Wait 1
Reset Pind.7
Set Pind.6
Wait 1
Reset Pind.6
Set Pind.5
Wait 1
Reset Pind.5
Loop
End
Kombinowałem jeszcze w ten sposób ale też nic z tego
$regfile = "m8def.dat"
$crystal = 1000000
Config Portb = Output
Config Portd = Output
Do
Set Pinb.2
Waitms 300
Reset Portb
Reset Portd
Set Pinb.1
Waitms 300
Reset Portb
Reset Portd
Set Pinb.0
Waitms 300
Reset Portb
Reset Portd
Set Pind.7
Waitms 300
Reset Portb
Reset Portd
Set Pind.6
Waitms 300
Reset Portb
Reset Portd
Set Pind.5
Waitms 300
Reset Portb
Reset Portd
Loop
EndProsiłbym o pomoc bo dla mnie ten kod wydaje się być logiczny