IOC - Arduino

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times

IOC - Arduino

Post by Docara »

Hi

Is there a way NOT to have IOC's triggered on both edges on the Arduino UNO R3

Thanks
Matt

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 - Arduino

Post by Benj »

Hi Matt,

I think it's an all or nothing thing with the IOC interrupt on that device.

There is an example here that uses software to filter out the pins that have changed and which edge, hopefully it will help.
https://www.flowcode.co.uk/wikiv7/index. ... Interrupts

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times

Re: IOC - Arduino

Post by Docara »

Hi Ben,

Thanks for the reply.

From which side? I'm not 100% sure but reasonably confident that according to the Data sheet for the 328P that active high and active low are available (not just INT0 or INT1) on the various pins.

Would you mind double checking your end for me please and give me a definite answer.

Thanks again

Matt

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 - Arduino

Post by Benj »

Hi Matt,

Looking at the datasheet you can choose which pins can trigger the interrupt but you are fixed to both edges triggering the interrupt on enabled pins.

Docara
Posts: 315
Joined: Sun Jun 23, 2013 1:29 pm
Has thanked: 28 times
Been thanked: 61 times

Re: IOC - Arduino

Post by Docara »

I'm confused -

From the datasheet Section 17 (page 87)

"The External Interrupts can be triggered by a falling or rising edge or a low level. This is set up as
indicated in the specification for the External Interrupt Control Register A (EICRA). When the External
Interrupts are enabled and are configured as level triggered, the interrupts will trigger as long as the pin is
held low. Note that recognition of falling or rising edge interrupts on INT requires the presence of an I/O
clock. Low level interrupt on INT is detected asynchronously. This implies that this interrupt can be used
for waking the part also from sleep modes other than Idle mode. The I/O clock is halted in all sleep modes
except Idle mode."

Am I misunderstanding the operation of Interrupts with the 328P and/or FC

I don't care whether it is rising, falling or level I just want it to fire once per event not twice (rising AND falling as stated in FC properties)

Matt

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 - Arduino

Post by Benj »

Hi Matt,

That section is referring to the INT type interrupt pins which can be configured to interrupt on a single edge and not the IOC interrupt which is both edges.

Post Reply