Page 1 of 1

IOC Port Interrupt ( Atmega328P )

Posted: Thu Sep 05, 2024 10:36 pm
by Alan_37
Hello

I am Trying to Add an IOC Port D Interrupt when I go to properties and select pins
only the Green will light up ( Trigger on both edges ),

how do I select falling edge or rising edge, please?

Re: IOC Port Interrupt ( Atmega328P )

Posted: Fri Sep 06, 2024 8:01 am
by medelec35
Hi Alan.
The AVR's IOC are different to PIC's.
On PICs you can either select rising, falling, both edges or no edges.
On AVRs the only selection you will have are both edges or no edges.
This is not a bug, it's just how AVR's are designed to work.
For edge detection on AVRs you could read the pin state within the IOC interrupt to determine what edge fired the interrupt.

Re: IOC Port Interrupt ( Atmega328P )

Posted: Fri Sep 06, 2024 10:12 am
by Alan_37
Thanks for your reply I understand .