Author Topic: Mega using rfm69HCW and attachinterrupt()  (Read 646 times)

Physwiz

  • NewMember
  • *
  • Posts: 5
Mega using rfm69HCW and attachinterrupt()
« on: June 03, 2019, 01:49:48 PM »
Hi,
Definitely a newbie here. I'd be very grateful for help with two questions -
a) Before I part with , can I just check that, because of limited hardware interrupts on the Moteino (two, I think), I need a MoteinoMEGA if I am going to use a transceiver PLUS two momentary switches using hardware interrupts?
 b)I am porting Arduino Uno code to Moteino-world. I understand Arduino Uno / Moteino use the Atmega 328P and the MoteinoMEGA uses the ATMega1284P. Will my Uno sketches, including libraries, work on the MoteinoMEGA and how will the Moteino-to-MoteinoMEGA interoperability be??

Thanks in advance,

Al.

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 6608
  • Country: us
    • LowPowerLab
Re: Mega using rfm69HCW and attachinterrupt()
« Reply #1 on: June 03, 2019, 02:20:26 PM »
If you HAVE to use hardware interrupts, then yes you'd need 3 in total, which the MoteinoMEGA has available (1 for radio, 2 free).
Otherwise you can use pinchange interrupts, search the forum for "pinchange" for several threads where this is discussed.
Otherwise Arduino -> Moteino/MoteinoMEGA interoperability should be pretty straight forward, minding the pin changes and any voltage level shifting required to/from 5V devices (if any applies).

Physwiz

  • NewMember
  • *
  • Posts: 5
Re: Mega using rfm69HCW and attachinterrupt()
« Reply #2 on: June 03, 2019, 03:51:55 PM »
Thanks Felix,
I'll look up pinchange interrupts and get myself a Mega.
Regards,
Al.