PIC24FV16KA302 Ext Interrupts

Any bugs you encounter with Flowcode should be discussed here.
canary_wharfe
Posts: 78
http://meble-kuchenne.info.pl
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

PIC24FV16KA302 Ext Interrupts

Post by canary_wharfe »

When using the IOC inputs, Flowcode 9 simulates the IOC macro (subroutine) perfectly. When using the external interrupts 0, 1, 2 i.e. hardware pins 16, 25, 23 on the FV chip the interrupt macro doesn't get called in the Flowcode simulator. On checking the component file in the FCD/PIC16 folder on the hard drive the designated interrupt input connections appear correct so not sure why the macro isn't getting called.

Also note the current OC1A designated PWM outputs for this FV device are incorrect.

Function OC1A is hardware pin 16, RB7
Function OC2A is hardware pin 22, RB11
Function OC3A is hardware pin 21, RB10

This is from the data sheet for the 28-pin PDIP/SOIC version.

I have corrected the PWM outputs as that's an easy edit of the component file but I would like to get the external interrupts working in the sim if possible.

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: PIC24FV16KA302 Ext Interrupts

Post by BenR »

Hello,

Thanks for letting us know. I have now solved the PWM pin issue for the FV devices in the family. Regarding the interrupt problem nothing is obviously wrong, can you attach a project that demonstrates the issue to make it easier to try and debug what's going wrong for you.

canary_wharfe
Posts: 78
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: PIC24FV16KA302 Ext Interrupts

Post by canary_wharfe »

Here you go Ben
24FV16KA302.fcfx
(17.45 KiB) Downloaded 52 times

canary_wharfe
Posts: 78
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: PIC24FV16KA302 Ext Interrupts

Post by canary_wharfe »

Ben

Have you had time to check the ext interrupts on this uploaded file by any chance?

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: PIC24FV16KA302 Ext Interrupts

Post by BenR »

Hello,

I've replicated the problem, not sure what's causing it at the moment. Needs further investigation as to what's going wrong.

canary_wharfe
Posts: 78
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: PIC24FV16KA302 Ext Interrupts

Post by canary_wharfe »

Ben

Can you at least confirm whether its only the simulation that isn't working but the compilation and hardware is working? At the moment I'm stuck cos I don't have the part (it's on back order from Microchip) and I need to know whether it is at least compiling correctly and therefore will work under hardware.

canary_wharfe
Posts: 78
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: PIC24FV16KA302 Ext Interrupts

Post by canary_wharfe »

Any update on this? It feels like this error has just gone down a black hole.

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: PIC24FV16KA302 Ext Interrupts

Post by BenR »

Hello,

Sorry it looks like a simulation only bug, the hardware should work as expected.

I'll have another dig into this for you tomorrow.

canary_wharfe
Posts: 78
Joined: Thu Dec 10, 2020 3:54 pm
Has thanked: 6 times
Been thanked: 11 times

Re: PIC24FV16KA302 Ext Interrupts

Post by canary_wharfe »

Thanks Ben

BenR
Matrix Staff
Posts: 1707
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 435 times
Been thanked: 598 times

Re: PIC24FV16KA302 Ext Interrupts

Post by BenR »

Hello,

It appears to be due to corruption of the project file surrounding the INT pin mask, we are investigating the reason.

For now we should be able to solve the problem by hand and allow the interrupts to work.

Here is a fixed version of your project.
24FV16KA302_Fix.fcfx
(17.47 KiB) Downloaded 43 times

Post Reply