Hi i am using an external interrupt(INT1) on my 18lf4620 but the problem is that when i leave it floating it causes infinite interrupts to be generated.If i enable the internal pull ups or have manual pull ups then it detects more then 1 interrupt when i actually give it a single interrupt.I am using a toggle switch for generating the -ve edged interrupt.Am i doing something wrong?
Your not doing anything wrong, it is the switch contacts bouncing that is causing multiple interrupts. You could add a resistor between the switch and the pin and a cap from the pin to Vdd to eliminate it. Or, you can eliminate it in software with some kind of debounce routine.
I had a feeling it was de bounce and just wanted to confirm, thanks. but i was not decided on where to add the de bounce routine.Actually since the switch thing is experimental and the real interrupt is going to be generated by a RTC for which i dont think i need a de bounce routine.Although i will activate the internal pulls..weak they may be.Thanks Mike.