Cannot Disable an Enabled “Interrupt on pin change”

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

Moderator: Benj

Post Reply
stylo
Posts: 23
Joined: Mon Mar 02, 2009 9:30 am
Been thanked: 3 times
Contact:

Cannot Disable an Enabled “Interrupt on pin change”

Post by stylo »

Hi Guys
Have programmed a MAIN loop which flashes a LED at 500ms intervals and a MACRO second loop that flashes the same LED at 100ms
The MAIN loop has a switch connected to a Interrupt on change pin (12F629 pin A0)
At power up the MAIN 500ms loop runs as it should,
When the switch is operated the program instantaneously jumps to the fast LED 100ms flashing BUT try as I might I cannot get back to the slow 500ms loop when the switch is then turned off, have tried putting a Disable interrupt under the Enable
interrupt etc. etc. but no joy
Any help appreciated
Stylo.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Cannot Disable an Enabled “Interrupt on pin change”

Post by Benj »

Hi Stylo,

Please attach your project file and we will have a look for you.

stylo
Posts: 23
Joined: Mon Mar 02, 2009 9:30 am
Been thanked: 3 times
Contact:

Re: Cannot Disable an Enabled “Interrupt on pin change”

Post by stylo »

Hi Benj
Thank for coming back.
Project file attached as requested.
Attachments
Interrupt_test, 5.8.19_2nd .fcfx
(11.32 KiB) Downloaded 189 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Cannot Disable an Enabled “Interrupt on pin change”

Post by Benj »

Hello,

Does this do what you need it to?
Interrupt_test, 5.8.19_2nd .fcfx
(11.8 KiB) Downloaded 198 times
This will wait until the end of the flash before checking the state of the pin. Do you need the change to be immediate and break the flash mid delay?

stylo
Posts: 23
Joined: Mon Mar 02, 2009 9:30 am
Been thanked: 3 times
Contact:

Re: Cannot Disable an Enabled “Interrupt on pin change”

Post by stylo »

Hi Benj
Thanks for the input.
Yes, the change must be immediate!
Best if I explain the function of this program.
This is a small part of a 10 up rocket launcher, ( EDIT. To clarify, this is an amateur rocket launching box for my sons hobby ) :)
On power up the power LED and a sounder operate at say 1 flash per sec, But if an ARM switch is operated the output must IMMEDIATELY jump to the fast ARMED LED flash and sounder as an instant warning that the fire button (Not shown) has been activated.
Going back to the unarmed stand by mode (Switch off) reverts back to the 1 flash per second.
Timing speed of this change over is not important.
Hope this helps.
Regards Stylo

Post Reply