Page 1 of 1

External interupts

Posted: Fri Jul 09, 2021 11:05 pm
by dz2869
Trying to convert a V8 project to V9.
PIC18F45K40
I am using External Interrupts INTR0 and INTR1 on B0 and B1
They work fine in V8 but do not seem to be working in V9

Attached is a small project that demonstrates the problem.
The program should toggle between the numbers 1 and 9 on the display.
Seems that INT0 always triggers INT1 so the number 9 is always displayed.

Thanks for any help on this one.

Re: External interupts

Posted: Mon Jul 19, 2021 2:34 pm
by dz2869
Anyone had a chance to look at this one yet?

Thanks

Re: External interupts

Posted: Tue Jul 20, 2021 12:18 pm
by BenR
Hello,

I've compared the C code produced by v8 and v9 for your project file and the C code appears to be identical.

I would be interested to know if your v9 is using the latest PIC compiler or if using the same PIC compiler as v8. You can check this by going into View -> Global Settings -> Locations tab and looking at the Override toolchain locations for PIC.

The v8 compiler will look something like this.
C:\Program Files (x86)\Flowcode\Common\Compilers\pic\

whereas the v9 PIC compiler will look something like this.
C:\Program Files (x86)\Flowcode\Common\Compilers\picv2\

If we can narrow it down to a compiler issue then it makes it easier to try and find the solution.

Re: External interupts

Posted: Wed Jul 21, 2021 3:16 am
by dz2869
Ben,

I actually haven't tied running the compiled V9 code on actual hardware yet.
I stopped after seeing that the program did not simulate correctly inside the flowcode application.
Maybe its just a simulation issue.

I'll check on the compliers

Thanks,
Dave

Re: External interupts

Posted: Wed Jul 21, 2021 6:10 am
by p.erasmus
Hi
I am using External Interrupts INTR0 and INTR1 on B0 and B1
They work fine in V8 but do not seem to be working in V9
Interrupts does not simulate in any version of Flowcode ,even in your V8 the code will not simulate :D maybe it worked in Hardware :D

Re: External interupts

Posted: Wed Jul 21, 2021 10:09 am
by BenR
Hello,

Pin based interrupts should work fine. That helps me narrow down where I'm looking. I'll have another look for you now.

Edit. Found and fixed the problem and posted the fix to the update system. Thanks for letting us know.

Re: External interupts

Posted: Wed Jul 21, 2021 4:56 pm
by dz2869
Working now

Thanks