Hallo,

ich bin noch Anfänger und versuche jetzt per Taster einen Ausgang an bzw. aus zu schalten.

Irgent was mache ich falsch denn es passiert gar nichts.
Kann mir jemand meinen Fehler erklären?

$regfile = "m8def.dat"
$crystal = 3690000
$baud = 19200

Const Keys = 4

Config Portb = Input
Portb = 255

Config Portc = Output

Dim I As Byte
Dim Key As Byte

Do
For I = 1 To Key
Key = I
Select Case Key
Case 1 : Debounce Pinb.0 , 0 , Key_o1 , Sub
Case 2 : Debounce Pinb.1 , 0 , Key_o2 , Sub
Case 3 : Debounce Pinb.2 , 0 , Key_o3 , Sub
Case 4 : Debounce Pinb.3 , 0 , Key_o4 , Sub


End Select
Next
Loop

Key_o1:
Toggle Pinc.0
Return

Key_o2:
Toggle Pinc.1
Return

Key_o3:
Toggle Pinc.2
Return

Key_o4:
Toggle Pinc.3
Return

End