Versuch mal folgendes:
anf: btfss PORTA,x ; teste Bit x von Porta
goto Ledan ; springe,wenn Bit=0 (Schalter gedrückt)
bcf Portb,y ; nicht gedrückt--> Led aus
goto anf:
Ledan: bsf PORTB,y ; setze Bit y von Port B (Led)
goto anf
Ist die einfachste Variante ohne Tastenentprellung.
MfG
Digger
Lesezeichen