Page 1 of 2

PIC24FV16KA302 Ext Interrupts

Posted: Mon Aug 08, 2022 12:07 pm
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.

Re: PIC24FV16KA302 Ext Interrupts

Posted: Mon Aug 08, 2022 12:52 pm
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.

Re: PIC24FV16KA302 Ext Interrupts

Posted: Mon Aug 08, 2022 2:46 pm
by canary_wharfe
Here you go Ben
24FV16KA302.fcfx
(17.45 KiB) Downloaded 61 times

Re: PIC24FV16KA302 Ext Interrupts

Posted: Sun Aug 14, 2022 9:55 pm
by canary_wharfe
Ben

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

Re: PIC24FV16KA302 Ext Interrupts

Posted: Wed Aug 17, 2022 3:52 pm
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.

Re: PIC24FV16KA302 Ext Interrupts

Posted: Mon Aug 29, 2022 4:06 pm
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.

Re: PIC24FV16KA302 Ext Interrupts

Posted: Wed Sep 14, 2022 4:51 pm
by canary_wharfe
Any update on this? It feels like this error has just gone down a black hole.

Re: PIC24FV16KA302 Ext Interrupts

Posted: Wed Sep 14, 2022 5:30 pm
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.

Re: PIC24FV16KA302 Ext Interrupts

Posted: Thu Sep 15, 2022 6:49 pm
by canary_wharfe
Thanks Ben

Re: PIC24FV16KA302 Ext Interrupts

Posted: Fri Sep 16, 2022 10:40 am
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 54 times