'Blitzer Steuerung für Modellautos' 'Prozessor: ATMega 8A $regfile "m8adef.dat" $crystal = 8000000 'Definiton der LED´s Const On = 1 Const Off = 0 Config Portb.0 = Output Config Portb.1 = Output Config Portc.0 = Output Config Portc.1 = Output Config Portc.2 = Output Config Portc.3 = Output Dim Speed As Integer '------------------------------------------------------------------------------ Speed = 5 Do Gosub Rundumlicht Portb.0 = On Portb.1 = On Waitms Speed Portb.0 = Off Portb.1 = Off Waitms Speed Portb.0 = On Portb.1 = On Waitms Speed Portb.0 = Off Portb.1 = Off Waitms 100 Loop End '------------------------------------------------------------------------------ Rundumlicht: Speed = 100 Portc.0 = On Waitms Speed Portc.0 = Off Portc.1 = On Waitms Speed Portc.1 = Off Portc.2 = On Waitms Speed Portc.2 = Off Portc.3 = On Waitms Speed Portc.3 = Off Return '------------------------------------------------------------------------------