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

  1. Home
  2. Categories
  3. ArduiPi
  4. RFM12_arrsi adding atmega 2560

RFM12_arrsi adding atmega 2560

Scheduled Pinned Locked Moved ArduiPi
2 Posts 2 Posters 5.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Edward7L
    wrote on last edited by
    #1

    @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.

    1 Reply Last reply
    • B Offline
      B Offline
      BrockDorf
      wrote on last edited by BrockDorf
      #2

      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.

      pcb assembly process

      1 Reply Last reply

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      0

      Online

      5.8k

      Users

      565

      Topics

      5.3k

      Posts

      Top Topics

      Popular Tags

      teleinfo
      25 topics
      arduino
      19 topics
      remora
      16 topics
      esp8266
      10 topics
      arduipi
      10 topics
      raspberry
      8 topics
      wifinfo
      7 topics
      broadcast
      7 topics
      Copyright © 2022 Charles-Henri Hallard | Return to blog page | Powered by NodeBB
      • Login

      • Don't have an account? Register

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