How to change IRQ D2 pin?

Started by Clemens, January 19, 2015, 06:54:03 PM

Clemens

I have a Seeeduino Stalker here. This has a DS3231 RTC onboard. The RTC is hardwired to D2 pin for wake up the ATmega328P via an external Interrupt from the RTC.

Now I want to connect also a RFM12b radio module, "by default" this is also connected to D2. How can I change this? Or can RTC and RFM share pin2?

Felix

Connect the RFM12B to D3 and change the pin in the library. They can't share the same interrupt pin.
Or actually they could but then you have to get smart in the software and determine where the INT came from (check the radio and the RTC to see which triggered), it gets more complicated. Easier to have 2 interrupts and separate the code for each, then you don't have to worry which interrupt happened.