Interrupt routine not being called

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Interrupt routine not being called

Post by Zane »

Hi,

The project i have been working on has failed to work with some real basic functionality i have used numerous other times. I have gone back to basics and created a simple flowchart. Even with this i cannot get the expected results in simulation or on hardware.

The flowchart is set up with an interrupt for timer0. When this overflows it should call an interrupt routine. In this routine it should toggle the LED A3 each time the routine is accessed. In the main loop there is another LED A2 that is also toggled each program cycle. If this section of code for toggling LED A2 is disabled the interrupt routine is never called and neither LED will flash. However if the code for flashing the LED in the main loop is enabled the interrupt routine is called and both LEDs flash.

I have tried opening the same flowchart in FC6 without the section of code for the LED A2 being present in the main loop and the interrupt routine is called without any issues.

I have tried completely uninstalling FC7 and reinstalling again but this has had no effect.

I cannot seem to find an explanation for what is going unless there is an some issue with my PC or an oversight on my behalf :?:

Thanks
Attachments
Flowcode1.fcfx
(11.76 KiB) Downloaded 194 times

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Interrupt routine not being called

Post by medelec35 »

Hi Zane,
I have reported it as a bug here on 13th April 2017.
It seems different settings take a different time to start the interrupt triggering process.
For example your flowchart on my PC takes just under 3 minutes to start flashing LED's within the interrupt macro
Then they just keep flashing indefinitely.
So just leave your flowchart running on maximum speed for a few minutes.
Not Ideal I know.
Hopefully this will be fixed in the next update?

Martin
Martin

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Interrupt routine not being called

Post by medelec35 »

As you can see, simulation does work after a time period has elapsed:
Interrupt Simulation bug.png
(66.72 KiB) Downloaded 2229 times
Hardware should work as normal.

Martin
Martin

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: Interrupt routine not being called

Post by Zane »

Hi Martin,

Thanks for your reply. Looks like i have been dealing with two separate issues here which has put me off a bit. One is the above issue and the other is the chip i am using. It is a PIC12f1840. It is not possible to drive the output A3. When it is written to nothing happens. I have tried another chip with the same result. I have tried toggling A2 to prove the chip is working, which it is. I will put another post up about this. Thanks for your help.

Cheers

Zane

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Interrupt routine not being called

Post by medelec35 »

Hi Zane,
Zane wrote:is not possible to drive the output A3.
If you look at the datasheet for 12F1840, it will show A3 as an input only:
12F1840 pins.png
(18.78 KiB) Downloaded 2219 times
Martin
Martin

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: Interrupt routine not being called

Post by Zane »

Hi Martin,

Thanks for that :oops: pointing out the obvious that i should have spotted

Cheers

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Interrupt routine not being called

Post by medelec35 »

Your welcome.
Just remember any microcontroller with MCLR can only be an input pin , if it has a dual function purpose.

Martin
Martin

Post Reply