Ich habe auf meinen LED-Board getestet. Es ging einwandfrei.

Ich habe mit UND-Verknüpfung realisiert

Hier Code:
Code:
$regfile = "m8def.dat"
$crystal = 4000000

'GND o---------[Taster]--------->PD.0
Config Pind.0 = Input                                       'Taster

'+5 V o---[1KOhm]---[A LED K]--->PC.0
Config Portc.0 = Output                                     'LED
Portc.0 = 1                                                 'LED aus

Do
If Pind.0 = 0 And Portc.0 = 1 Then
Waitms 100                                                  'Entprellzeit beim loslassen des Tasters
Portc.0 = 0                                                 'LED an
Waitms 250                                                  'Entprellzeit
End If
If Pind.0 = 0 And Portc.0 = 0 Then
Waitms 100                                                  'Entprellzeit  beim loslassen des Tasters
Portc.0 = 1                                                 'LED aus
Waitms 250                                                  'Entprellzeit
End If
Loop
Ich hoffe, dir geholfen zu haben.