Hi,
I am a newbie to pics but have survived my first few hello world/ blinking LED projects on a 12F683. I want to experiment with making one of the blinking LED projects begin as a reaction to a switch press that causes a call to an interrupt routine. I studied the 12F683 data sheet section 12.4 and figured out, I think, how to get it to work.
My problem? I am unclear on how to debounce the switch.
I am using Mikro C and want to use the button function to de-bounce the switch but am afraid, based on the Mikro C button example, that the way that it is done in a do/ while loop will obscure the interrupt pin from sensing the outside world trigger. Is there a software solution or does the switch debounce need to done in hardware external to the chip? If anyone has gone down this road already, I would appreciate any help in how you approached this problem.
Thanks in advance,
Dave
I am a newbie to pics but have survived my first few hello world/ blinking LED projects on a 12F683. I want to experiment with making one of the blinking LED projects begin as a reaction to a switch press that causes a call to an interrupt routine. I studied the 12F683 data sheet section 12.4 and figured out, I think, how to get it to work.
My problem? I am unclear on how to debounce the switch.
I am using Mikro C and want to use the button function to de-bounce the switch but am afraid, based on the Mikro C button example, that the way that it is done in a do/ while loop will obscure the interrupt pin from sensing the outside world trigger. Is there a software solution or does the switch debounce need to done in hardware external to the chip? If anyone has gone down this road already, I would appreciate any help in how you approached this problem.
Thanks in advance,
Dave