Page 1 of 1

Problems with custom interrupt

Posted: Mon Feb 06, 2017 9:21 pm
by Niro
Hi guys,

new problem... ;-)
I am trying to create an interrupt on PCINT0 (ATmega 328) which calls a macro on every phase change (the FC interrupt only reacts on rising OR falling edge)
Do you have any idea what I'm doing wrong?

Thanks,
Niro

Re: Problems with custom interrupt

Posted: Tue Feb 07, 2017 10:09 am
by LeighM
Hi,
The ATmega datasheet says that a pin change interrupt will trigger if any enabled pin toggles.
So the interrupt will occur on a rising or falling edge.
Are you saying that is not happening?

Re: Problems with custom interrupt

Posted: Tue Feb 07, 2017 6:41 pm
by Niro
Hi,
yes this ist true, that is what I need. But the code I've posted doesn't work.
I only said, that the interrupt macros provided with FC doesn't support this behaviour.

Re: Problems with custom interrupt

Posted: Tue Feb 07, 2017 6:54 pm
by Niro
...found the mistake.
The code I've posted is working fine!

Niro