External interupts

Any bugs you encounter with Flowcode should be discussed here.
Post Reply
dz2869
Posts: 14
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 8:29 pm
Has thanked: 1 time
Been thanked: 1 time

External interupts

Post 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.
Attachments
Ext_Interupts.fcfx
(12.16 KiB) Downloaded 195 times

dz2869
Posts: 14
Joined: Tue Dec 08, 2020 8:29 pm
Has thanked: 1 time
Been thanked: 1 time

Re: External interupts

Post by dz2869 »

Anyone had a chance to look at this one yet?

Thanks

BenR
Matrix Staff
Posts: 1895
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 491 times
Been thanked: 664 times

Re: External interupts

Post 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.

dz2869
Posts: 14
Joined: Tue Dec 08, 2020 8:29 pm
Has thanked: 1 time
Been thanked: 1 time

Re: External interupts

Post 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

User avatar
p.erasmus
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: External interupts

Post 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
Regards Peter - QME Electronics

BenR
Matrix Staff
Posts: 1895
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 491 times
Been thanked: 664 times

Re: External interupts

Post 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.

dz2869
Posts: 14
Joined: Tue Dec 08, 2020 8:29 pm
Has thanked: 1 time
Been thanked: 1 time

Re: External interupts

Post by dz2869 »

Working now

Thanks

Post Reply