IOC Error Pic16F1455

Moderator: Benj

Post Reply
User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

IOC Error Pic16F1455

Post 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 2148 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 2148 times
P3.jpg
P3.jpg (36.38 KiB) Viewed 2148 times
Example code
Firmware.rar
(613.96 KiB) Downloaded 143 times
Thanks for looking into this

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: IOC Error Pic16F1455

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

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: IOC Error Pic16F1455

Post by QMESAR »

Ok Thanks Ben

Post Reply