Interrupts?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Ondra
Posts: 325
Joined: Wed Aug 29, 2007 7:33 pm
Been thanked: 2 times
Contact:

Interrupts?

Postby Ondra » Fri Dec 07, 2007 4:27 am

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

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Postby Sean » Fri Dec 07, 2007 10:23 am

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.