Page 1 of 1

IOC Error Pic16F1455

Posted: Mon Feb 17, 2020 6:02 am
by QMESAR
Hi Team.
Not sure if it a bug or I am the bug any case PIC16F1455 I set pin RA5 (only 1 pin) as IOC pin Interrupt on Rising edge .
The Interrrupt never fires,
As you see here the normal configuration in FC.
P1.jpg
P1.jpg (74.99 KiB) Viewed 2647 times
Then I moved the IOC interrupt to the top and do a C code setup just below it then the Interrupt fires correctrly ,I did not have time to check what FC use as configuration as the customer where standing with me in lab to take his fix with him
P2.jpg
P2.jpg (73.91 KiB) Viewed 2647 times
P3.jpg
P3.jpg (36.38 KiB) Viewed 2647 times
Example code
Firmware.rar
(613.96 KiB) Downloaded 178 times
Thanks for looking into this

Re: IOC Error Pic16F1455

Posted: Mon Feb 17, 2020 1:32 pm
by Benj
Hi Peter,

It looks like you have to read the PortA register after enabling the IOC and this should then arm the interrupt. I've experienced the very same problem on hardware here in the past couple of weeks.
IOC.jpg
IOC.jpg (11.25 KiB) Viewed 2629 times
I could potentially put this code into the interrupt enable icon code generation so that it simply just works. I'll make a note to investigate rolling this out but it's tricky to detect which pins are enabled and hence what code to generate. I could read all associated port registers as a hit it with a hammer type solution.

Re: IOC Error Pic16F1455

Posted: Mon Feb 17, 2020 2:26 pm
by QMESAR
Ok Thanks Ben