<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[RFM12_arrsi adding atmega 2560]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/charleshallard" aria-label="Profile: charleshallard">@<bdi>charleshallard</bdi></a><br />
Hello, I am trying to add the atmega 2560 to the libraries RFM12B_arrsi.h and RFM12B_arssi.cpp. What do I need to change or add to get this to work? I have tried adding<br />
#elif defined(<strong>AVR_ATmega2560</strong>) || defined(<strong>AVR_ATmega1280</strong>)<br />
#define RFM_DEFAULT_IRQ 2<br />
#define SS_DDR      	  DDRB<br />
#define SS_PORT         PORTB<br />
#define SS_BIT          0<br />
#define SPI_SS          53    // PB0, pin 19<br />
#define SPI_MOSI        51    // PB2, pin 21<br />
#define SPI_MISO        50    // PB3, pin 22<br />
#define SPI_SCK         52    // PB1, pin 20</p>
<p dir="auto">to RFM12B_arssi.h and</p>
<p dir="auto">#elif defined(<strong>AVR_ATmega2560</strong>) || defined(<strong>AVR_ATmega1280</strong>)<br />
if (irq_pin==10 || irq_pin==11 || irq_pin==2)<br />
{<br />
// 1st detach the existing one<br />
detachInterrupt(irq_pin==2?2:irq_pin-10);</p>
<pre><code>irq_pin = irqPin;
</code></pre>
<p dir="auto">}<br />
else<br />
{<br />
// Set new pin<br />
irq_pin = RFM_DEFAULT_IRQ;<br />
}</p>
<p dir="auto">to the function void RFM12B::SetIRQ(uint6_t irqPin) in RFM12B_ arssi.cpp and</p>
<pre><code>#elif defined(__AVR_ATmega2560__) || defined(__AVR_ATmega1280__)
  //  IRQ authorized are D10 (INT0), D11 (INT1) or D2 (INT4) added by me :) 
  if (irq_pin==10 || irq_pin==11 || irq_pin==2)
  {
    if (nodeID != 0)
      // INT0 or INT1 for pin D10/D11 and INT2 for pin D2
      attachInterrupt(irq_pin==2?2:irq_pin-10, RFM12B::InterruptHandler, LOW);
    else
      // INT0 or INT1 for pin D10/D11 and INT2 for pin D2
      detachInterrupt(irq_pin==2?2:irq_pin-10);
  }
</code></pre>
<p dir="auto">to RFM12B_arssi.cpp in the function RFM12B:: ConfigureInterrupts(); This does not work and it fails the detection in radio.isPresent. Any help would be greatly appreciated.</p>
]]></description><link>https://community.ch2i.eu/topic/266/rfm12_arrsi-adding-atmega-2560</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 15:54:55 GMT</lastBuildDate><atom:link href="https://community.ch2i.eu/topic/266.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Apr 2018 01:35:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to RFM12_arrsi adding atmega 2560 on Tue, 16 Oct 2018 17:44:17 GMT]]></title><description><![CDATA[<p dir="auto">Hi...the first option is when AVR and ESP are connect over serial 1. In this mode you can't use USB (upload and monitor are unavailable). You must accept this fact and monitor using serial 2, telnet, LCD, TV out .. . To change the sketch you must select other mode with dip switches. Or use ESP firmware with AVR sketch OTA upload over WiFi.</p>
<p dir="auto"><a href="https://www.7pcb.com/PCB-Assembly-Process.php" target="_blank" rel="noopener noreferrer nofollow ugc">pcb assembly process</a></p>
]]></description><link>https://community.ch2i.eu/post/2582</link><guid isPermaLink="true">https://community.ch2i.eu/post/2582</guid><dc:creator><![CDATA[BrockDorf]]></dc:creator><pubDate>Tue, 16 Oct 2018 17:44:17 GMT</pubDate></item></channel></rss>