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.
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
Example code
Thanks for looking into this
IOC Error Pic16F1455
Moderator: Benj
- 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
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.
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.
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel