??? 02/20/07 07:51 Read: times |
#133287 - How its happen? |
Dear all,
here my schematic ![]() My program INIT: MOV SP,#7 LOOP: CPL P1.7 LCALL DELAY LJMP LOOP DELAY: MOV R0,#1 L21: MOV R1,#80 L11: MOV R2,#0FFH DJNZ R2,$ DJNZ R1,L11 DJNZ R0,L21 RET .END Sorry my circuit maybe not perfect, but my strong question is not in my circuit. After I apply the power supply, Program running properly. The LED blinking constant (time on = time off). I disturb my circuit by pressing SW1 many times, and I see the LED time blinking not constant. My question: How the value in register R0, R1, R2 are change? If I see the delay time on the LED is like more than 5 in the R0 in the delay subrutin but in my program I never load value more than 1 in R0. thankyou verymuch regard hendry |