Lars: Geht dieses Programm? 2006-07-01 13:07:07 code at 0 include c51rd2.inc tastehoch bit p3.3 tasterunter bit p3.2 LEDs data p2 sjmp init org 0003h cjne r0,#7d,hoch zurueck0: reti org 0013h cjne r0,#0d,runter zurueck1: reti init: setb IT0 setb IT1 setb IE0 setb IE1 setb EX0 setb EX1 setb EA mov r0,#0b mov LEDs, 00000001b haupt: sjmp haupt hoch: inc r0 mov a,r0 mov dptr, #8ledphasen movc a,@a+dptr mov LEDs,a sjmp zurueck0 runter: dec r0 mov a,r0 mov dptr, #8ledphasen movc a,@a+dptr mov LEDs,a sjmp zurueck1 8ledphasen: DB 00000001b, 00000010b, 00000100b, 00001000b, 00010000b, 00100000b, 01000000b, 10000000b