Using an Arduino Uno Ethernet, I've made a board that allows me to open/close my garage doors via a webpage. I'm now looking to add one additional element of functionality to my project, but am limited by the 2 officially supported interrupts of the Uno.
Is there an IC (DIP package) that would enable me to connect 2 reed switches and have either one of them trigger a single digital pin acting as an interrupt? This is more than a basic OR chip, as I need to be able to detect either a rising or falling edge of either switch.
Hope this is somewhat clear?
cheers,
J>
is there an IC that does...
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- zener
- Posts: 4567
- Joined: Sat Feb 21, 2009 2:38 am
Re: is there an IC that does...
Well I can answer this a couple of ways. First of all you don't have to use an interrupt to sense the switches, you could use polling. As far as your original idea, although you can't use an OR gate you can probably use an XOR gate. Its output will transition when either of its inputs changes.
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: is there an IC that does...
You can also use 'pin-change' interrupts:
http://www.arduino.cc/playground/Main/PinChangeInt
-or-
http://arduino.cc/playground/Main/PcInt
http://www.arduino.cc/playground/Main/PinChangeInt
-or-
http://arduino.cc/playground/Main/PcInt
-
- Posts: 18
- Joined: Sat Jul 09, 2011 1:57 pm
Re: is there an IC that does...
Many thanks for the quick replies! I hadn't thought about simply polling the switches; interrupts just seemed like such an elegant way to do things. I've already soldered my circuit with the switches on pins D2/D3, so will play with the PinChangeInt and PcInt libraries as suggested. Do you know if I can use these when I've already configured "standard" interrupt methods?
cheers,
J>
cheers,
J>
- adafruit_support_bill
- Posts: 88151
- Joined: Sat Feb 07, 2009 10:11 am
Re: is there an IC that does...
I haven't tried combining them myself, but it should work. Let us know how it works out!
Please be positive and constructive with your questions and comments.