PIC16F18877 IOC Flag register readout

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
pschoon
Posts: 14
http://meble-kuchenne.info.pl
Joined: Thu Dec 31, 2020 2:14 pm
Been thanked: 3 times

PIC16F18877 IOC Flag register readout

Post by pschoon »

Hi,

I like to use multiple IOC's to read out.
Using the IOC is only one time possible. So all external interrupts have to be read out in this interrupt.
This makes the code more complex by the fact I have to check every bit used in this interrupt.

Is it possible to add an interrupt function using the bit flag register?

Best regards.

PS

Steve-Matrix
Matrix Staff
Posts: 1433
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 197 times
Been thanked: 332 times

Re: PIC16F18877 IOC Flag register readout

Post by Steve-Matrix »

My solution for this would probably be as follows:
  • Enable the IOC interrupt with all pins I care about selected
  • Have this call a macro
  • In this macro, check each input in turn and call another macro to deal with that pin
This may be what you are doing anyway. But it should not be too complex if you put the code for each specific pin in a separate macro and then have the main interrupt macro just check for the status of each pin.

pschoon
Posts: 14
Joined: Thu Dec 31, 2020 2:14 pm
Been thanked: 3 times

Re: PIC16F18877 IOC Flag register readout

Post by pschoon »

Hi Steve,

Thanks for the quick reply. As you suggested this is exactly what i'm doing now.
As the PIC16F18877 is a chip also used in the e-blocks2, Interrupt based on the bit flag register could be a comprehensive feature....

Thanks for now.

Steve-Matrix
Matrix Staff
Posts: 1433
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 197 times
Been thanked: 332 times

Re: PIC16F18877 IOC Flag register readout

Post by Steve-Matrix »

Thanks for the suggestion - I'll make sure this gets some thought.

No promises though. It's already very complicated trying to cover native interrupts for the wide range of devices and families we support.

pschoon
Posts: 14
Joined: Thu Dec 31, 2020 2:14 pm
Been thanked: 3 times

Re: PIC16F18877 IOC Flag register readout

Post by pschoon »

Thanks for notifying my suggestion.

Post Reply