Hi
Is there a way NOT to have IOC's triggered on both edges on the Arduino UNO R3
Thanks
Matt
IOC - Arduino
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 - Arduino
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
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
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
Re: IOC - Arduino
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
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
- 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
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.
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.
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
Re: IOC - Arduino
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
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
- 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
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.
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.
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