1. Download the latest Arduino 1.5 IDE version (version 1.5.6 or higher) for your operating system from www.arduino.cc/en/Main/Software and install it to suit. You'll also find more step-by-step guides for installation here: www.arduino.cc/en/Guide/HomePage. At time of writing, IDE 1.5 is a BETA version not the stable release of the Arduino IDE.
Windows users please note: The Freetronics USB drivers must be downloaded and used for first-time installation of the EtherDue's USB port: www.freetronics.com/usbdriver. To use the "native" USB Port, you will also need to install the USB drivers that come with Arduino (the Arduino installer will do this for you.)
2. Once the Arduino IDE is installed, we're ready to do the initial board and port setup. You won't need to do this again unless the serial port number changes such as when using a different USB port on your computer.
3. In the Arduino IDE, select Tools > Board > Arduino Due (Native Port) or Tools > Board > Arduino Due (Programming Port). You can use either USB port on the EtherDue to program it, the "Native" port is faster to upload but sometimes the EtherDue won't automatically reset after programming. The ports are labelled on the PCB, "Native" is closest to the corner and "Programming" is adjacent to the RJ45 Ethernet socket.
4. Before connecting your EtherDue to the USB port, have a look at the list of ports in Tools > Serial Port. That's where your EtherDue serial port is going to appear when you plug it in.
5. Connect your EtherDue to the computer USB port. We supply an appropriate USB cable with the EtherDue. After a short while if you look at Tools > Serial Port again you'll see a new port appear: that's the EtherDue ready to be used. Select that port now with Tools > Serial Port so there is a tick mark next to it
6. You're ready to go. The Arduino IDE now knows about your board and has a connection to it. You should immediately see the green power LED "P" illuminate, and possibly the orange progammable LED "L".
Compiling and uploading a sketch to the EtherDue"Sketch" is the Arduino term for a program. To test uploading a simple sketch to your EtherDue:
1. Choose File > Examples > Digital > Blink. You'll see the code for Blink open in the IDE.
2. Select Sketch > Verify/Compile, you've now built (compiled) the program ready to be loaded.
3. Lastly, to load the program into the EtherDue, select File > Upload to I/O Board. You'll see the orange LED "L" (connected to pin D13) flicker as the board is reset. If you used the "Programming" port then the green and yellow RX and TX LEDs will flash while the upload is in being done.
4. A few seconds later the RX and TX LEDs will go off, the board will reset, and the red D13 LED should begin flashing on and off at 1 second intervals. If the LED doesn't start flashing, you may need to press the "Reset" button on the EtherDue by hand. Congratulations! You've now compiled and uploaded your first sketch to the EtherDue. Try experimenting with changing the delay values in the sketch and repeating the process to see the LED blink at different rates.
Click the image below to see a full sized detailed pinout of the EtherDue (the same pinout applies to the official Arduino Due.)
Using the RJ45 LAN port
The network functionality of the EtherDue uses the Wiznet W5100 chip, which is the same chip used on the official Arduino Ethernet Shield. We also kept all the pin assignments the same, so functionally the EtherDue is identical to having, say, an Arduino Due with an official Arduino Ethernet Shield plugged into it.
This means any relevant tutorials or examples you find will work just fine on the EtherDue, and also that it's fully supported by the official "Ethernet" library and associated examples included with the Arduino IDE. If you select File > Examples > Ethernet you will see a variety of sketches that you can try with your EtherDue.
In the Ethernet examples, the hardware MAC address is not programmed from the hardware but instead set inside the sketch. You'll find the MAC address shown near the start of each of the Ethernet examples. You can pick any valid MAC address you like as long as it's unique on your network. However, the EtherDue is special in that it also has a preprogrammed MAC address on a dedicated chip! You can read our guide to how to set a unique MAC address from the chip. This allows you to run the same sketch on several EtherDues, without needing to manually change the MAC address on each one.
There is one small addition you may need to make to EtherDue sketches with Ethernet support, so Ethernet works correctly after a power on. This is because of the onboard reset chip feature of the EtherDue. Read about it here.
Using the microSD card slot
The microSD card socket is on the bottom of the EtherDue, due to space constraints. The microSD socket is supported by a variety of libraries that implement different versions of the FAT filesystem commonly used on microSD cards. The Arduino IDE comes bundled with the "SD" library pre-installed including some example sketches, so look in File > Examples > SD to see how to communicate with a microSD card.
The "chip select" line for the microSD on the EtherDue is D4, the same as used in the examples bundled with the IDE. The examples should work exactly as-is.
Note that even though both the Ethernet chipset and the microSD card slot use the same SPI bus, you can still have both features operating at the same time because they can share those pins. You can therefore combine those features to do things like display a list of files on a microSD card in a web page.
Differences from Arduino Mega, EtherMega, EtherTen
The EtherDue (and Arduino Due it is based on) have a few differences from other Arduino models:
- Due is 32-bit ARM based not 8-bit AVR based, meaning they have much more CPU power for better performance. However some older Arduino libraries may make assumptions about all Arduinos being AVR based, and not compile or run as expected.
- Due is a 3.3V device not a 5V device. This means you cannot connect any EtherDue I/O pin to a voltage higher than 3.3V!! If you have a 5V device to interface with EtherDue, consider using our LEVEL logic level converter module to reduce the voltage to a safe level.
- Due has two i2c ports, not just one. The first i2c port uses pins 20 & 21. The second i2c port uses the SDA1 & SCL1 pins. To access the second i2c port in your sketch, use "Wire1" to replace any instance of "Wire", ie "Wire1.begin()"
The EtherDue includes an onboard switchmode power supply in place of the regular "linear" regulators used on typical Arduino-compatible boards. The power source is automatically selected by the EtherDue.
With an external voltage (7-12V recommended, 6-20V possible) connected to the DC In 2.1mm jack, the EtherDue will run from DC In power.
With nothing connected to DC In, but with a USB host or charger connected to either USB port, the EtherDue will run from USB power.
Using Power Over Ethernet
The Power Over Ethernet connection pin headers allow you to provide the EtherDue's "VIn" power via PoE. However most commercial PoE is 48V and you cannot connect this directly to the pin header (20V max for VIn.) See our Power Over Ethernet page for explanations of some options to hook up your EtherDue with PoE.
Jumpers on Bottom of Board
There are several solder jumpers on the bottom of the board that can be cut open or shorted closed to change functionality:
- "MAC Address Chip" i2c Bus Connections - these jumpers are shorted closed by default, but can be cut open to disconnect the MAC address chip from the i2c bus. See the MAC address chip page for details.
- "D2INT" - this jumper is open (not connected) by default, but if closed across with a blob of solder it will connect digital pin 2 to the INT output from the W5100 Ethernet Chip. This output is not supported by the Arduino Ethernet library.
- "Analog Reference" - the two jumpers here refer to the internal ADC reference. "ADC_3V3" is shorted closed by default, and connects the ADC reference to the 3.3V internal voltage. If you cut this jumper open and solder shut the other jumper, ADC_AREF, then the ADC reference will be taken from the AREF pin on the board. Note that by default the AREF pin on the EtherDue is not connected to anything. The AREF voltage cannot be higher than 3.3V.
- "JTAG Reset" - this jumper is shorted closed by default, if cut open then the JTAG Reset signal will not be able to reset the MCU.
- "Test" - this jumper is open (not connected) by default, but if closed across will short the TST pin on the ATSAM3X to ground to enter JTAG Test Mode. This is not normally used.
|MCU Type||Atmel ATSAM3X
|MCU Clock Speed||84 MHz|
|Input Voltage||7-12V DC recommended, 6-20V DC possible (onboard switchmode power supply)|
|Digital I/O pins||54 (12 provide PWM output) (analog, CAN and CAN pins all also support digital I/O, giving 70 digital I/O total if required)|
|Pin change interrupts||Available on any I/O pin (same as Arduino Due)[*]|
|Analog Input Pins||12|
|Analog In Resolution||12 bits, 0-4095 at 3.3V AREF is approx 0.8mV (0.0008V) per step|
|Current Per I/O Pin||24 mA source (output), 14 mA sink (input) current on most I/O pins. 9mA on some others. See pinout diagram above for details|
|Analog Output Pins||2 DACs for true analog output|
|Analog Out Resolution||12 bits, 0-4095 is approx 0.8mV (0.0008V) per step|
|Total Current For All I/O Pins||130mA maximum|
|Current At 3.3V||800mA maximum|
|Flash Memory||512 KB Flash Memory|
|SRAM||96 KB SRAM in two banks, 64KB and 32KB|
|microSD||microSD card slot with SPI interface. Uses pin D4 (chip select), SPI pins|
|Serial||4 x hardware USART serial ports, SPI (Serial Peripheral Interface), 2 x I2C ports|
|Ethernet||1 x 10/100 LAN port using the Wiznet W5100. Uses pins D10 (chip select), SPI pins.|
|CANBus||2 x CANBus ports|
|USB 2.0 High Speed||"Native" High Speed USB port able to act as USB device (serial port, mouse/keyboard) or USB host.|
|USB Programming Port||"Programming" USB port connected to USB/Serial interface and serial port 0 (RX/TX) for programming or serial communications.|
|Other||Many other one-wire, multi-wire, LCD and expansion devices supported by free code and libraries|
[*] Except digital pin 10, which is connected internally to the Ethernet interface.