hallo_welt_v08.gif
$regfile = "M8def.dat"
$crystal = 1000000
$hwstack = 100
$swstack = 100
$framesize = 100


'LED1 an PD7
Led1 Alias Portd.7
Config Led1 = Output

'LED2 an PD6
Led2 Alias Portd.6
Config Led2 = Output

'LED2 an PD5
Led3 Alias Portd.5
Config Led3 = Output

'TASTER1 an PD2
Taster1 Alias Pind.2
Config Taster1 = Input
Portd.2 = 1       'PullUp-Widerstand einschalten

Dim Status As Byte


Do
   Bitwait Taster1 , Reset
   Bitwait Taster1 , Set

   If Status = 0 Then
      Led1 = 1
      Led2 = 0
      Led3 = 0
      Status = 1
   Elseif Status = 1 Then
      Led1 = 0
      Led2 = 1
      Led3 = 0
      Status = 2
   Else
      Led1 = 0
      Led2 = 0
      Led3 = 1
      Status = 0
   End If
Loop


End

Was macht dieses Programm?


mfg Gerold :-)



Den zugehörigen Original-Beitrag findest du im Loetstelle-Forum.