> PLEASE TELL ME WHAT IS WRONG WITH MY CODE? Andrea, You need to debounce the switch. When a switch opens and closes the contacts connect and disconnect intermittently at first. Put a scope on input and look at the edge when you open and close the switch to see what I mean. To fix this a little more software is needed. Each time you detect a press pause for a short time and check again to see if the switch is still pressed. If it is, then consider the button to be pressed. Similarly each time you detect a release pause for a short time and check again to see if the switch is still released. If it is, then consider the switch to be released. I don't know how long you should pause so a little experimentation might be necessary. - -Mark