Board Selection

Which supported board should you use?


There are currently two supported boards.

  1. 1. Arduino Due/X.

    This board uses Atmel’s SAM3X MCU running at 120MHz, Cortex M3 architecture.

  1. 2. Atmel SAM4S XPLAINED Pro.

    This board uses Atmel’s SAM4S MCU running at 120MHz, Cortex M4 architecture.


In general, both are as capable as each other, except that SAM3X has a built-in Ethernet module. However, the Arduino Due/X does not wire out the Ethernet. So, you cannot use it. I will support the new SAM4E XPLAINED Pro board in the near future. This board does have an Ethernet on board. There are many uses of an Ethernet. I am currently leaning toward a UDP-based DeviceNet protocol for sending requests to the Hempstick for controlling outputs like PWM LEDs for panels, etc.



You don’t really care much about whether it’s a Cortex M3 or M4 architecture. But there are other considerations.



Debugger/Programmer Considerations


With the Arduino Due/X, you must purchase an additional hardware debugger/programmer like the SAM-ICE or Atmel ICE. I would also highly recommend the new Atmel ICE, as it does both SAM and AVR. But since it’s so new, you must use the latest version of Atmel Studio IDE. However, note that, the Arduino Due comes with it’s traditional ATMega with firmware acting as an Arduino debugger. Atmel Studio does not support this Arduino debugger. Luckily, Arduino Due/X wires out the JTAG pins so we can use regular Atmel Debuggers connecting to the JTAG header (0.5” pitch though, so you will need a special header for it; get it from Olimex!). Because of this, with an Arduino Due/X board, you can use it for both Arduino and Hempstick (or anything else).


On the other hand, the SAM4S XPLAINED Pro board comes with an Embedded DeBuGger chip (EDBG) on board. It is the same chip as in the new Atmel ICE debugger. So, you get a free on board debugger/programmer to re-program and debug your board. Anytime you got a problem, you can debug that board. But, you obviously cannot use the EDBG for other boards that do not come with EDBG.


In addition to the new Atmel ICE kit, which comes with the header, wires, and stuff, you can opt for the cheaper board-only Atmel ICE PCBA. But I must warn you about purchasing this one. Atmel uses 0.5” pitch header on this debugger, kind of difficult to find.


What are other differences?


I/O and Board Layout Considerations


The Arduino Due/X has the standard Arduino headers. That is, the ADC pins are all collected in one place, the digital pins are all collected together.


On the other hand the Atmel XPLAINED Pro series of boards have their own header layout. Each extension header has a set of two analog pins, a set of SPI pins, a set of I2C pins, a set of GPIO pins. They did this so that you can plug in extension boards, sort of inter-exchangeably. You can purchase or develop new extension boards like OLED board, accelerometer board, etc.


The XPLAINED Pro series boards usually have 3x extension headers, plus a couple of non-standard headers like an LCD header, if the MCU has LCD module on it, or some parallel IO header if the MCU has more GPIO pins, etc.


That means, with the SAM4S XPLAINED Pro, you would have to look at the user’s guide for the board and hunt for which pin does what. Not a deal breaker, but kind of annoying.


For your first shot, I would recommend using the SAM4S XPLAINED Pro board, as it’s cheaper and works much better with the Atmel Studio IDE than the Arduino Due/X (Arduino Due/X board comes with bootloader that was meant for Arduino IDE, so there is a little trick to make it work with Atmel Studio). Once you are familiar with the whole process, you can chose other board. After all, this is not a completely off-the-shelf thing, you do use the Hempstick library to develop your own firmware, albeit in a very simplified manner.