Page 1 of 1

Arduino UNO Interrupt

Posted: Tue Jan 30, 2018 5:44 pm
by AqaFlow
How can I trigger interrupt on LOW state for Arduino UNO, I mean not on CHANGE or FALLING, but on LOW state
(Flowcode 7)
as from ARDUINO Refernce "LOW to trigger the interrupt whenever the pin is LOW"

Thanks in advance
Amrat

Re: Arduino UNO Interrupt

Posted: Wed Jan 31, 2018 1:38 pm
by Benj
Hello,

Which interrupt are you looking at in the AVR datasheet?

Re: Arduino UNO Interrupt

Posted: Wed Jan 31, 2018 4:13 pm
by AqaFlow
I am not expert in programming so not look deep into data sheet but what I mean is in Arduino IDE INT0 INT1 , please see below paragraph from Arduino Refernce,

Parameters
interrupt: the number of the interrupt (int)
pin: the pin number (Arduino Due, Zero, MKR1000 only)
ISR: the ISR to call when the interrupt occurs; this function must take no parameters and return nothing. This function is sometimes referred to as an interrupt service routine.
mode: defines when the interrupt should be triggered. Four constants are predefined as valid values:

LOW to trigger the interrupt whenever the pin is low, <============

CHANGE to trigger the interrupt whenever the pin changes value

RISING to trigger when the pin goes from low to high,

FALLING for when the pin goes from high to low.
The Due, Zero and MKR1000 boards allows also:

HIGH to trigger the interrupt whenever the pin is high.


But in Flowcode INT Icon property, LOW is not available ??

Thanks
Amrat

Re: Arduino UNO Interrupt

Posted: Wed Jan 31, 2018 4:18 pm
by Benj
Hello,

I'm looking at this for you now. Which version of Flowcode are you using?

Re: Arduino UNO Interrupt

Posted: Thu Feb 01, 2018 1:09 am
by AqaFlow
Flowcode 7

Thanks

Re: Arduino UNO Interrupt

Posted: Thu Feb 01, 2018 11:04 am
by Benj
Hello,

Thanks for letting me know which version, I've moved the topic so it's now in a better location.

If you extract the attached files into your "Flowcode 7/FCD/AVR" directory and restart Flowcode then the extra interrupt settings should now be available.
AVR.zip
(69.18 KiB) Downloaded 330 times
Let us know how you get on.

Re: Arduino UNO Interrupt

Posted: Sun Mar 25, 2018 9:58 am
by AqaFlow
Hi Benj,
Sorry for very late reply.
Your provided AVR.zip is great now I got LOW setting as well.

BUT Interrupt on HIGH is still not show in the drop down menu of " Interrupt Edge Select "
Only available,
Rising Edge of INT
Falling Edge of INT
Any Edge of INT
Low Level of INT

no High level of Pin to trigger INT !!
Flowcode v7.3.0.5 (Dec 14 2017)


Thanks again.
Amrat

Re: Arduino UNO Interrupt

Posted: Mon Mar 26, 2018 3:31 pm
by Benj
Hello Amrat,

In the datasheet for the ATMEGA328P it only gives these options for the interrupt.

Low Level, Logical Change, Falling Edge, Rising Edge.

So I don't think the chip supports a High option.

Re: Arduino UNO Interrupt

Posted: Mon Mar 26, 2018 4:10 pm
by AqaFlow
Benj,
Thanks. Ok all clear