RFM69 & custom IRQ pin

Started by terop, November 13, 2015, 08:29:09 AM

terop

I have an issue with IRQ pin config. I have gsm shield and RFM69HW attached on same arduino board and it makes IRQ config problematic. I can use almost any other pins than INT0 or INT1 (2,3) which are used by gsm shield. I have EnableInterrupt library with #define EI_NOTPORTD and I dont have compilation errors coming anymore from softSerial or GSM3SoftSerial conflicts which was my first problem. For now I need some help how to modify rfm69.cpp and rfm69.h to work with digital pin 8 as IRQ pin.

Felix

Here are my thoughts. If you absolutely need another interrupt, then go for the MoteinoMEGA. It's not worth the time to invest into making the library change since it's not supported by the hardware.
Your only other option is to use pinchange interrupts but that makes things a bit more complicated.

terop

I found this post:

https://lowpowerlab.com/forum/index.php?topic=460.0

Reply #5 seems to be close what I'm looking but I can't figure out where these changes should do because I can't get this working. Moteino MEGA is an option but then I need to make other HW changes and it takes time too, probably more.


Felix

Tero,
There are only 2 hardware interrupts on the Moteino, and 3 on the Moteino MEGA. That's why I suggested just trying the MEGA instead and that will allow you to move your GPS interrupts to INT0 and INT1, leaving the default INT2 for the radio.

The post you linked is trying to change between the hardware interrupts, so that won't work for you.
You could try play with pinchange interrupts instead, but INT0 is still hardwired to the radio interrupt on the PCB so you'd have to deal with that and also change the library, not something I am willing to do just as an experiment.