(newbie) Pin confusion between example and board pins

  • HI,
    Am making a Sensebender based gateway with Ethernet and RFM69 radio and while I'm waiting for the hardware I am trying to get the gateway sketch sorted out.
    My confusion has to do with the stated SPI Issue between the W5100 and anything else on the SPI bus.

    Specifically in this part of the code:

    // Enable Soft SPI for NRF radio (note different radio wiring is required)
    // The W5100 ethernet module seems to have a hard time co-operate with
    // radio on the same spi bus.
    #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)  <--------- Line 1
    #define MY_SOFTSPI
    #define MY_SOFT_SPI_SCK_PIN 14
    #define MY_SOFT_SPI_MISO_PIN 16
    #define MY_SOFT_SPI_MOSI_PIN 15
    // When W5100 is connected we have to move CE/CSN pins for NRF radio    <--- Section 2
    #ifndef MY_RF24_CE_PIN
    #define MY_RF24_CE_PIN 5
    #ifndef MY_RF24_CS_PIN
    #define MY_RF24_CS_PIN 6

    The comment lines state the W5100 is the module with the SPI "issue"
    In line 1 it seems to result in not defining the soft SPI if the CPU is a SAMD (which the Sensebender is)

    In Section 2 no mention is made for the RFM69 radio.

    My question is:

    What Pin numbers are being referenced in this snippet? (I'm still struggling to sort out the Arduino pin numbers, I understand the goal but moving between different boards and ersatz Arduino's is a challenge for me)

    If the CPU is a SAMD do I need to use a soft SPI? I would think the CPU shouldn't matter if the issue is with the W5100.

    Any clarification will be greatly appreciated.


    The source of the example I am following is from:
    Gateway Code for Ethernet

Log in to reply

Suggested Topics

  • 10
  • 1
  • 4
  • 1
  • 53
  • 7
  • 97
  • 10