Hi all. I am trying to use interrupts in my program.
I am confused as to, do Interrupts fire on an input of logic 1 or 0.
I can't get any consistency. I am using PIC18F258 clock speed 18432000
What am I missing.
Ondra Simons
Interrupts?
-
- Valued Contributor
- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
Hello Ondra
The external interrupt pins (INTx) are edge triggered - they react when the signal level changes in the selected direction. The active edge (positive going or negative going) can be selected in the Flowcode interrupt configuration screen.
The fast reaction time of interrupts can sometimes lead to confusing results if there is noise on the signal source (switch bounce, contact arcing etc.).
The system may receive several positive and negative edges during each transition of the input, especially if the signal source is a mechanical device like a switch or relay. Electronic sources (signal generators etc.) produce much cleaner signals.
A clean-up circuit or software filter (de-bounce) may be required if a clean signal source is not available.
The external interrupt pins (INTx) are edge triggered - they react when the signal level changes in the selected direction. The active edge (positive going or negative going) can be selected in the Flowcode interrupt configuration screen.
The fast reaction time of interrupts can sometimes lead to confusing results if there is noise on the signal source (switch bounce, contact arcing etc.).
The system may receive several positive and negative edges during each transition of the input, especially if the signal source is a mechanical device like a switch or relay. Electronic sources (signal generators etc.) produce much cleaner signals.
A clean-up circuit or software filter (de-bounce) may be required if a clean signal source is not available.