Arduino Due
Overview
When I first got my Due in the mail I searched the web for a simple overview to help me better understand what new features Arduino is bringing to the table with the new development board. After finding next to nothing I decided to write my own general overview post in hopes that it would help out someone in a situation similar to mine. The Arduino Due is the first ARM-based development board from Arduino and features a powerful 32bit CortexM3 microcontroller. The board is fully programmable through the familiar Arduino IDE. The processing power is significantly increased over a traditional 8bit Arduino board and the coding language was kept very similar to what we are familiar with, making the transition to the new board very easy for most.
The Arduino Due shares a similar form factor to that of an Arduino Mega with the due having a few more pins, and two micro-USB ports instead of one. The Due sports 54 digital I/O pins of which 12 are PWM enabled, 12 Analog inputs, 4 UART’s, a USB-OTG capable connection, 2 DACs, 2 TWI, a JTAG header and SPI connector. An 84MHz clock fuels the CortexM3 engine and the boards operating voltage is 3.3v unlike the previous Uno, Leonardo, and Mega which all run on 5v. The Due is able to handle input voltages from 6-20V, but the recommended input voltage is between 7 and 12 volts. The total DC Current output on all I/O pins is 130mA while the current for the 3.3v and 5v pins is limited to 800mA. Because of the Atmel SAM3X8E’s 3.3v limit, existing Arduino shields that utilize 5v won’t work properly on the Due. Shields that utilize Arduino’s official R3 layout will work out of the box however.
It is important to note that using a shield that presents an input voltage greater than 3.3v to any of the I/O pins will damage that pin and could possibly (most likely) kill your Due all together. If you are unsure about a shield, I recommend that you fully read the shields data sheet, website documentation or contact the shields manufacturer before attempting to use it on your Due. Users have 512KB of flash memory to store their code in as well as two banks of SRAM totaling 96KB (Split into 64KB and 32KB). Compiling code for the Due is handled in the latest version of the Arduino IDE : Version 1.5, which will replace Arduino 1.0.1 after the testing phase completes.
In-depth look (Some info provided by Arduino.cc)
The SAM3X Core
The Due’s 32-bit ARM core outperforms traditional 8-bit Arduino hardware by leaps and bounds.
- A 32-bit core, that allows operations on 4 bytes wide data within a single CPU clock.
- CPU Clock at 84Mhz.
- 96of SRAM.
- 512of Flash memory for code.
- a DMA controller, that can relieve the CPU from doing memory intensive tasks.
Memory
The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code, with bootloader being pre-burned in factory from Atmel and is stored in a dedicated ROM memory. The available SRAM is 96 KB in two contiguous bank of 64 KB and 32 KB. All the available memory (Flash, RAM and ROM) is accessible directly as a flat addressing space. Erasing the Flash memory of the SAM3X is as easy as pressing the onboard erase button, and holding it for a few seconds while the board is powered.
Communication
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers, and different devices like phones, tablets, and cameras. Provided is one hardware UART and three hardware USARTs for TTL (3.3V) serial communication. Programming is handled via an ATmega16U2, which provides a virtual COM port to software on a connected. ATmega is also connected to the SAM3X hardware UART. Serial on pins RX0 andTX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller. The Native USB port is connected to the SAM3X. It allows for serial (CDC) communication over USB. This provides a serial connection to the Serial Monitor or other applications on your computer as well as enabling the Due to emulate a USB mouse or keyboard to an attached computer. The Native USB port can also act as a USB host for connected peripherals such as mice, keyboards, and smartphones. Also supported are the TWI and SPI communication and the Arduino software includes a Wire library to simplify use of the TWI bus.
I/O
Digital I/O: pins from 0 to 53 - The Due features 54 digital pins that can be used as an input or output. They operate at 3.3 volts with each pin being able to source a current of 3 mA or 15 mA, depending on the pin. Additionally each pin is able to receive (sink) a current of 6 mA or 9 mA, again, depending on the pin. Each digital pin also has an internal pull-up resistor (disconnected by default) of 100 KOhm. Some pins also have specialized functions:
UART - Used to receive (RX) and transmit (TX) TTL serial data (with 3.3 V level). Pins 0 and 1 are connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.
- Serial: 0 (RX) and 1 (TX)
- Serial 1: 19 (RX) and 18 (TX)
- Serial 2: 17 (RX) and 16 (TX)
- Serial 3: 15 (RX) and 14 (TX)
PWM: Pins 2 to 13 - Provide 8-bit PWM output.
SPI: SPI header - These pins support SPI communication using the SPI library. The SPI pins are broken out on the central 6-pin header, which is physically compatible with the Uno, Leonardo and Mega2560. The SPI header can be used only to communicate with other SPI devices, not for programming the SAM3X with the In-Circuit-Serial-Programming technique. The SPI of the Due has also advanced features that can be used with the Extended SPI methods for Due.
CAN: CANRX and CANTX - These pins support the CAN communication protocol but are not not yet supported by Arduino APIs.
"L" LED: 13 - There is a built-in LED connected to digital pin 13. When the pin is HIGH, the LED is on, when the pin is LOW, it's off. It is also possible to dim the LED because the digital pin 13 is also a PWM outuput.
TWI - Support TWI communication using the Wire library.
- TWI 1: 20 (SDA) and 21 (SCL)
- TWI 2: SDA1 and SCL1.
Analog Inputs: pins from A0 to A11 - The Due has 12 analog inputs, each of which can provide 12 bits of resolution (i.e. 4096 different values). By default, the resolution of the readings is set at 10 bits, for compatibility with other Arduino boards. It is possible to change the resolution of the ADC with analogReadResolution(). The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more then 3.3V on the Due’s pins will damage the SAM3X chip. The analogReference() function is ignored on the Due.The AREF pin is connected to the SAM3X analog reference pin through a resistor bridge. To use the AREF pin, resistorBR1 must be desoldered from the PCB.
DAC1 and DAC2 - These pins provides true analog outputs with 12-bits resolution (4096 levels) with the analogWrite() function. These pins can be used to create an audio output using the Audio library.
AREF - Reference voltage for the analog inputs.
Reset - Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.
Power
The Arduino Due can be powered via the USB connector by an external power supply with the power source being selected automatically. External (non-USB) power can come either from an AC-to-DC adapter or battery. The adapter can be connected by plugging a 2.1mm barrel jack into the board's power jack. In addition, leads from a battery can also be inserted in the Gnd and Vin pin headers of the POWER connector to provide power in the event the power source is missing a barrel jack. The board can operate on an external supply of 6 to 20 volts. A voltage of less than 5v on the 5v pin may be noticed if supplied with less than 7v. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.The power pins are as follows:
- VIN. This is the input voltage to the Arduino board when it's using an external power source (as opposed to 5 volts from the USB connection or other regulated power source). You can supply voltage through this pin, or if supplying voltage via the power jack, access it through this pin.
- 5V. This pin outputs a regulated 5V from the regulator on the board. The board can be supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can damage your board. We don't advise it.
- 3.3V. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 800 mA. This regulator also provides the power supply to the SAM3X microcontroller.
- GND. Ground pins.
- IOREF. This pin provides the voltage reference with which the microcontroller operates. A properly configured shield can read the IOREF pin voltage and select the appropriate power source or enable voltage translators on the outputs for working with the 5V or 3.3V.
Other Features
The Arduino Due has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. If more than 500 mA is applied to the USB port, the fuse will automatically break the connection until the short or overload is removed. The Arduino Due’s physical size is 4” x 2.1” with the USB and Power jacks extending beyond those dimensions. The Arduino Due is designed with compatibility of most official Arduino shields in mind. It is pin compatible with Uno, Diecimila or Duemilanove. Digital pins 0 to 13 (and the adjacent AREF and GND pins), analog inputs 0 to 5, the power header, and "ICSP" (SPI) headers. The main UART (serial port) is located on the same pins (0 and 1). However, I2C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5. Programming
The Arduino Due can be programmed with the Arduino 1.5 and above software. Loading sketches to the SAM3X is different than the AVR microcontrollers found in other Arduino boards because the flash memory needs to be erased before being re-programmed. Upload to the chip is managed by ROM on the SAM3X, which is run only when the chip's flash memory is empty.Either of the USB ports can be used for programming the board, though it is recommended to use the Programming port due to the way the erasing of the chip is handled:
- Programming port: To use this port, select "Arduino Due (Programming Port)" as your board in the Arduino IDE. Connect the Due's programming port (the one closest to the DC power jack) to your computer. The programming port uses the 16U2 as a USB-to-serial chip connected to the first UART of the SAM3X (RX0 and TX0). The 16U2 has two pins connected to the Reset and Erase pins of the SAM3X. Opening and closing the Programming port connected at 1200bps triggers a “hard erase” procedure of the SAM3X chip, activating the Erase and Reset pins on the SAM3X before communicating with the UART. This is the recommended port for programming the Due. It is more reliable than the "soft erase" that occurs on the Native port, and it should work even if the main MCU has crashed.
- Native port: To use this port, select "Arduino Due (Native USB Port)" as your board in the Arduino IDE. The Native USB port is connected directly to the SAM3X. Connect the Due's Native USB port (the one closest to the reset button) to your computer. Opening and closing the Native port at 1200bps triggers a 'soft erase' procedure: the flash memory is erased and the board is restarted with the bootloader. If the MCU crashed for some reason it is likely that the soft erase procedure won't work as this procedure happens entirely in software on the SAM3X. Opening and closing the native port at a different baudrate will not reset the SAM3X.Unlike other Arduino boards which use avrdude for uploading, the Due relies on bossac.
Features | Useful Links |
---|---|
|
|
(Some content in this post was copied from Arduino.cc)