In SX Microcontrollers, SX/B Compiler and SX-Key Tool, roondog wrote: I finally got the LED to react to the pushbutton. I only need the LED to stay on after the button is pressed which it doesn't do now. I thought the [b]mov second,#$d0[/b] and [b]mov second+1,#$07[/b] would put the number 2000 into 2 memory locations and then the [b]djnz second,loop[/b] and [b]djnz second+1[/b] loop would decrement the two memory locations to stop the loop after 2000 cycles and then turn off the LED with the[b] clrb RB.7[/b]. Does this code look correct? Is there any easier way to make the LED stay on for 2000 cycles? Any suggestions would be greatly appreciated. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=429713#m430590 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2010 (http://www.dotNetBB.com)