Skip to content

Transceiver Connection

dario edited this page Apr 2, 2017 · 14 revisions

Transceiver Connection

The below table reports the connection for the supported transceivers, you need this details if you are manually wiring the transceiver on your host microcontroller.

Wiznet W5100 / W5200 / W5500

The Wiznet W5100 (or W5200 / W5500) is an Ethernet transceiver generally used in the Arduino Ethernet Shield and Arduino Ethernet, if you have a module to wire manually use the following connection:

Microcontroller Communication Protocol Chip Select
ATmega328, ATmega32U4, ATmega2560 SPI 10

Each microcontroller use different pin for SPI, refer to Arduino SPI for details.

Microchip ENC28J60

The Microchip ENC28J60 is an Ethernet transceiver generally used in unofficial Arduino Ethernet Shield, if you have a module to wire manually use the following connection:

Microcontroller Communication Protocol Chip Select
ATmega328, ATmega32U4, ATmega2560 SPI 10

Each microcontroller use different pin for SPI, refer to Arduino SPI for details.

Nordic nRF24L01 and nRF24L01+

The Nordic nRF24L01 and nRF24L01+ are wireless 2.4 GHz transceiver available as dedicated module that need to be manually wired to the host microcontroller. It use SPI as communication protocol, the drivers used by default the Hardware SPI or as option the Software SPI.

Microcontroller Communication Protocol Chip Select Enable
ATmega328, ATmega32U4, ATmega2560 Hardware SPI 8 7

Each microcontroller use different pin for SPI, refer to Arduino SPI for details. The SPI protocol allow multiple slaves as long as they use different Chip Select pins, but in some cases has been observer that nRF24L01 radio doesn't work properly while sharing the SPI with other transceivers. For this reason an option is communicate with nRF24L01 using a Software SPI, this of course consume more resources (FLASH and RAM).

There are several Software SPI library, Souliss doesn't bundle any Software SPI and you need to install it separately. A suggested Software SPI is included in Digital IO library.

Enable the Software SPI as follow

#include <DigitalIO.h>
#define	nRF24SPI_INSKETCH

SoftSPI<SOFT_SPI_MISO_PIN, SOFT_SPI_MOSI_PIN, SOFT_SPI_SCK_PIN, SPI_MODE> nRF24SPI;

setup()
{
 ...
}

You need to specify the MISO, MOSI and SPI pin that Software SPI will use, the CS and EN pins remains the 8 and 7.

Max frame cutout The nRF24L01 radio has constrains on maximum frame lenght and this result into a cutout at 32 bytes of payload. Considering a 11 byte of header (5 for MaCaco and 6 for vNet) the result is that no more than 21 bytes of payload and so 21 SLOTS can be transferred.

HopeRF RFM69HW

The HopeRF RFM69HW is a wireless 900 MHz transceiver used in Moteino boards and available as external radio, if you have a module to wire manually use the following connection:

Microcontroller Communication Protocol Chip Select
ATmega328, ATmega32U4, ATmega1284 SPI SS

Each microcontroller use different pin for SPI and SS, refer to Arduino SPI for details.

The drivers for RFM69HW use the default SS pins, if you are using an Ethernet transceiver the default pins reported before are no longer applicable, the following applies:

Microcontroller Ethernet Transceiver Communication Protocol Chip Select
ATmega328 W5100/W5200 SPI 7
ATmega32U4 W5100/W5200 SPI 11
ATmega1284 W5100/W5200 SPI 49
ATmega328 W5500 SPI 8
ATmega32U4 W5500 SPI 11
ATmega1284 W5500 SPI 49
ATmega328 ENC28J60 SPI 7
ATmega1284 ENC28J60 SPI 0

USART (RS485)

The microcontroller has an embed USART that can be used for direct communication or via an RS485 transceiver, this vNet driver is based on the default Serial library from the Arduino cores. Some microntrollers has multiple USART peripherals, you can define use any of the available for the communication via USART.

Microcontroller USART Pins (RX, TX)
ATmega328 Serial 0, 1
ATmega32U4 Serial1 0, 1
ATmega2560 Serial, 0, 1
ATmega2560 Serial1, 19, 18
ATmega2560 Serial2, 17, 16
ATmega2560 Serial3, 15, 14
ESP8266 Serial 1, 3

Define the USART to include in the configuration option at top of the sketch (before #include "Souliss.h")

#define USARTDRIVER_INSKETCH
#define	USARTDRIVER	Serial	// or any other USART to use

Special option are available in conf/usartUsrCfg.h as the baudrate, those are generally useful in case of RS485 communication

Option Description
USART_TXENABLE Activate the USART_TXENPIN pin before any transmission
USART_TXENPIN The pin to use to active the transmission
USART_COLLISION Enable or disable the collision avoidance
USART_CRCCHECK Enable or disable the CRC check

Max frame cutout The USART has a cutout that is used to avoid a lack of performances of the Collision Avoidance build in the software driver, this result into a cutout at 36 bytes of payload. Considering a 11 byte of header (5 for MaCaco and 6 for vNet) the result is that no more than 25 bytes of payload and so 25 SLOTS can be transferred.

Broadcast transceiver Any USART broadcast transceiver can be connected to the USART and used with this vNet driver, is required the broadcast behavior (all connected devices shall be able to listen), this driver has been tested with:

  • RS485 Transceiver
  • Ciseco XRF 900 MHz Radio
Clone this wiki locally