Hack Forums
[Arduino] inputs with interupt - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45)
+--- Forum: Whitehat • Blue Team • Defensive Security (https://hackforums.net/forumdisplay.php?fid=448)
+---- Forum: IoT, Embedded Systems, Electronics, Gadgets, and DIY (https://hackforums.net/forumdisplay.php?fid=193)
+---- Thread: [Arduino] inputs with interupt (/showthread.php?tid=4976533)



inputs with interupt - Crawlius - Sep 5, 2015

hi

i'm looking for IC or device so i can upgrade the arduino interupts.
the arduino uno has 2 interupt pins ,but I want 10 inputs via interupt.

I cant really use the other arduino pins , because the other interupts are " interupt on change" :(

regards...


* - Eight - Sep 6, 2015

What do you want to use the interrupts for ? From what I just read, the interrupt on change gets triggered whenever one of the 20 (?) pins changes, so maybe you can store the state of the pins in your code, and when the interrupt gets triggered, compare the current state with the old state to see which interrupt changed and then act accordingly.


* - Crawlius - Sep 20, 2015

Thats a possibility
But a pulse wil get you 2 interupt changes in a short time
So the routine to poll the differance you have to twice and with extra if then elses to trim out the unwanted edge