Skip to content
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Community Forum

E

Edward7L

@Edward7L
About
Posts
1
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent

  • RFM12_arrsi adding atmega 2560
    E Edward7L

    @charleshallard
    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
    #elif defined(AVR_ATmega2560) || defined(AVR_ATmega1280)
    #define RFM_DEFAULT_IRQ 2
    #define SS_DDR DDRB
    #define SS_PORT PORTB
    #define SS_BIT 0
    #define SPI_SS 53 // PB0, pin 19
    #define SPI_MOSI 51 // PB2, pin 21
    #define SPI_MISO 50 // PB3, pin 22
    #define SPI_SCK 52 // PB1, pin 20

    to RFM12B_arssi.h and

    #elif defined(AVR_ATmega2560) || defined(AVR_ATmega1280)
    if (irq_pin==10 || irq_pin==11 || irq_pin==2)
    {
    // 1st detach the existing one
    detachInterrupt(irq_pin==2?2:irq_pin-10);

    irq_pin = irqPin;
    

    }
    else
    {
    // Set new pin
    irq_pin = RFM_DEFAULT_IRQ;
    }

    to the function void RFM12B::SetIRQ(uint6_t irqPin) in RFM12B_ arssi.cpp and

    #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);
      }
    

    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.

    ArduiPi
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups