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.
External interupts
-
- Posts: 14
- http://meble-kuchenne.info.pl
- Joined: Tue Dec 08, 2020 8:29 pm
- Has thanked: 1 time
- Been thanked: 1 time
-
- Matrix Staff
- Posts: 1895
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 491 times
- Been thanked: 664 times
Re: External interupts
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: External interupts
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
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
- 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
Hi
Interrupts does not simulate in any version of Flowcode ,even in your V8 the code will not simulate maybe it worked in HardwareI 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
Regards Peter - QME Electronics
-
- Matrix Staff
- Posts: 1895
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 491 times
- Been thanked: 664 times
Re: External interupts
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel