Getting started with the Arduino Due. Arduino Due: Pinout, Wiring Diagram and Programming Arduino Due Projects

Arduino Due - represents a more serious solution than . This is the first Arduino board based on a 32-bit core.

Characteristics

  • Microcontroller: AT91SAM3X8E;
  • Clock frequency: 84 MHz;
  • Bit depth: 32 bits
  • Supply voltage: 3.3V;
  • Input voltage (recommended): 7-12V;
  • Input voltage (limit): 6-16 V;
  • Digital outputs I / 0: 54 lines (12 of them - PWM);
  • Analog inputs: 12 (ADC);
  • Analog outputs: 2 (DAC);
  • Flash-memory: 512 KB (all memory is available for programs);
  • SRAM-memory: 96 KB;
  • Maximum current on I/0 pin: 130 mA;
  • Maximum current at the output 3.3V: 800 mA;
  • Maximum current on 5V pin: 800 mA;
  • Length: 101.52mm;
  • Width: 53.3mm;
  • Weight: 36g;

Connection

You will need to connect to a computer.

Nutrition

The Arduino Due can be powered from USB, via , or from an external power source: . , the plug of which (Ø 2.1 mm, center positive) must be connected to the power socket. If the battery is the external power source, then it must be connected to the Vin and GND pins. The power supply type is selected automatically.

More about the board

The Arduino Due is based on an Atmel SAM3X8E ARM Cortex-M3 32-bit microcontroller clocked at 84MHz. Unlike most Arduino boards, the Arduino Due runs on 3.3V, has 2 I2C ports, a CAN port, 2 analog outputs (DAC), 2 microUSB ports with USB support OTG - the ability to connect other USB devices to USB port. The presence of a DMA controller allows you to free the processor from resource-intensive tasks. Apart from reset buttons there is an Erase button (on-board erasure), holding which for a few seconds, in the presence of power, will lead to a hardware erasure of data from the Flash-memory. The bootloader is flashed at the factory into a dedicated memory area specially for it. It should be noted that the presence of a voltage greater than 3.3V at any input may damage the board.

Software

Download (download) program Arduino IDE to create, edit and upload sketches to Arduino or Genuino, you can

Good day!
For quite a long time, at my leisure, I have been doing all sorts of electronic knick-knacks. I started with programming tinek and meg in IAR until I realized that things are much easier with Arduino. And just recently I discovered a copy of the Arduino DUE in the open spaces of Chinese stores at a price slightly more expensive than the notorious Mega2560.

For those who do not know what it is and what it is eaten with

Arduino is an electronic kit and a convenient platform for the rapid development of electronic devices for beginners and professionals. The platform is very popular all over the world due to the convenience and simplicity of the programming language, as well as open architecture and program code. The device is programmed via USB without the use of programmers.

Arduino allows the computer to go beyond the virtual world into the physical and interact with it. Arduino-based devices can receive information about the environment through various sensors, and can also control various actuators.

The microcontroller on the board is programmed using the Arduino language (based on the Wiring language) and the Arduino development environment (based on the Processing environment). Arduino-based device projects can run on their own or interact with software on a computer (eg: Flash, Processing, MaxMSP). Boards can be assembled by the user on their own or purchased as a set. The software is available for free download. The original circuit drawings (CAD files) are public, users can use them as they wish.
© arduino.ru


I started my acquaintance with arduino with the purchase of the Chinese analogue Mega2560. At first, I played, connected displays, sensors, servomotors, until somehow I needed to make a device for work that reads voltages from a current shunt and a thermistor, converts the whole thing into a normal form and displays it on the display. This is where the arduina came in handy, in 5 minutes the sketch was written, the display was connected and the board moved to work. Of course, it turned out from a cannon on sparrows, but at that time it was the most fast decision. Then I ordered a dozen ProMini for 100 rubles and wanted to transfer the sketch to one of them, but as you know, there is nothing more permanent than temporary and my laziness did not let me do it. At home, I had to be content with hundred-ruble boards, since, apart from the number of pins, memory, and the lack of a USB-UART converter, they did not differ much from the mega.

But there were not enough conclusions, and one day, wandering through the expanses of banggood, I stumbled upon the Arduino DUE. Its price was slightly higher than on Mega2560 and I immediately bought it. Its main difference from other arduins is that inside it has a 32-bit ARM microcontroller of the Cortex-M3 architecture operating at a frequency of 84 MHz.

The parcel arrived in 27 days, the board was wrapped in several layers of bubble wrap and packed in a typical yellow Chinese package.

Front view:


The soldering is done neatly, but if you look closely, there are small flaws in the silk-screen printing.
As you can see from the photo this fee has two microUSB connectors. One is necessary for programming, and through the second the board can communicate with the outside world: read flash drives, emulate a keyboard, mouse (I have not tested this myself yet). There is also a tricky erase button, pressing which erases the flash of the microcontroller.

Back view:

Specifications of the board (taken from the off site):
Microcontroller: AT91SAM3X8E
Working voltage: 3.3V
Input voltage (recommended): 7-12V
Input voltage (limit): 6-20 V
Digital I/O: 54 (of which 12 provide PWM output)
Analog inputs: 12
Analog outputs: 2 (DAC)
General day off D.C. on all inputs/outputs: 50 mA
DC current through 3.3V pin: 800mA
DC current through 5V pin: 800mA
Flash Memory: 512 KB total available for user applications
RAM: 96 KB (two banks: 64 KB and 32 KB)
Clock frequency: 84 MHz

All standard interfaces such as SPI, 1Wire, UART are present.
More details can be read

And here is the bigger MK itself:

The 16th mega with 16 MHz quartz is responsible for its programming:

And it is clocked by an external quartz:


As Comrade Angrim suggested, 84 MHz are obtained by multiplying by 7 the original 12.

An important feature is that, unlike other Arduino boards, the Arduino Due operates at 3.3V. The maximum voltage that the input/outputs can withstand is 3.3V.
In principle, most sensors can work from 3.3 volts, but some shields will not work.
In other matters, you can always buy these things: fortunately, there is 5V on the board.

To write sketches and fill them, you need to download Arduino 1.5.8 BETA, with DUE support. However, it should be noted that not all libraries written for other versions of Arduino work normally with DUE. I have a library for working with the BMP180 sensor that normally worked with the mega, gave out unrealistic data, I had to download the library from Adafruit. I also noticed that the MK does not always start executing the program after power is applied, sometimes you need to press reset. Whose glitch it is, I don't know the beta version of the IDE or the Chinese board.

Tests

First, for verification, I uploaded a sketch that interrogates the BMP180 sensor and writes data from it (pressure and temperature) to a USB flash drive.


Everything worked, however, as I wrote above, I had to use the Adafruit library.

Result

And of course, why not use the built-in DAC!
To do this, we fill in the SimpleAudioPlayer example, connect the USB flash drive with the test.waw waw file filled in, and connect the DAC0 output together with the ground to the amplifier. In my case, the amplifier was a portable speaker that I received from a Pringles promotion. I simply wound the conclusions to the jack with two 10 kΩ resistors. on a straight line, the speaker was heavily overloaded.

We rejoice at the music from the column!


The sound, of course, is so-so, all the same, 12 bits make themselves felt, but for an arduino it’s not even bad!
Now I plan to buy a color display and drive video on it.

Well, as a result, consider the pros and cons of this arduino
Pros:
- Low cost
- 32 bit controller and frequency 84 MHz.
- Availability of DAC 12 bit 1Msps
- 12 bit ADC
- Proprietary USB

Minuses:
- 3.3V operating voltage (not compatible with some shields/devices)
- Incompatibility with some libraries.
- Sometimes after turning on the power you need to press reset to start the program

In general, I liked it, maybe in the future some more jambs will come out, if I let you know.

Thank you all for your attention!

I plan to buy +60 Add to favorites Liked the review +51 +107

Radio Module NRF24L01, OKI 120A2, SD Card Module, Brush Motor Controller IC, M590E GSM GPRS Modem, Real Time Clock DS 3231/DS 1307, Mini 360 on LM2596, L293D, Infrared Distance Sensors, Real Time Clock, HC-SR501, Unit Mini 360 power supply on the LM2596 scheme, Controller L298N, HC-SR501, GSM GPRS, Modem M590E GSM GPRS, Real time clock DS 3231/DS 1307, Wi-Fi module ESP8266-12E, Card Module, Power supply, Mini 360, L293D, Mini 360 power supply on the scheme LM2596, Radio module, IR remote control remote control, IR Remote, Ethernet shield, Brushed Motor Controller IC, Brushed Motor Controller IC, IR Remote Control, SD Card Module, NRF24L01 Radio Module, OKI Motor, L293D, stepper motor, Power supply, L293D, Mini 360 power supply in LM2596 scheme, SD memory card, Ethernet shield, motion sensor HC-SR501, Wi-Fi module ESP8266-12E, OKI 120A2 stepper motor, Stepper motor,

The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 processor. This is the first Arduino board based on a 32-bit microcontroller with an ARM core.

Unlike other Arduino boards, the Arduino Due runs on 3.3V. The maximum voltage that the I/O can handle is 3.3V.



Arduino Due Board

Arduino Due Specifications

microcontroller

AT91SAM3X8E

Working voltage

3.3V

7-12V

Input voltage (limit)

6-20V

Digital inputs/outputs

54 (12 of which provide PWM output)

Analog inputs

Analog outputs

2 (DAC)

DC current through input/output

50 mA

DC for 3.3V output

800 mA

DC for 5V output

800 mA

Flash memory

512 KB

RAM

96 KB (two banks: 64 KB and 32 KB)

Clock frequency

84 MHz

General information

Arduino Due is a device based on Atmel SAM3X8E ARM Cortex-M3 microprocessor. This is the first Arduino board based on a 32-bit ARM microcontroller. It consists of 54 digital outputs (of which 12 can work as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial transceivers), an 84 MHz clock generator, USB with OTG technology, 2 DAC (digital-to-analog converters), 2 TWI, power connector, SPI connector, JTAG connector, reset button and memory clear button.

Note: Unlike other Arduino boards, the Arduino Due's operating voltage is 3.3V. Accordingly, the maximum voltage that its outputs can withstand is 3.3V. Applying a higher voltage to the output (for example, 5V) can lead to failure of the board.

The device includes everything necessary to ensure the operation of the microcontroller; To get started, simply supply power from an AC/DC adapter or battery, or connect it to a computer via a USB cable. The Arduino Due is compatible with all 3.3V powered expansion boards and conforms to pinout requirements 1.0:

  • The SDA and SCL (TWI) pins are located near the AREF pin.
  • There is an IOREF pin that allows expansion boards to adjust to the Arduino's operating voltage. Due to this, expansion boards can be compatible with both 3.3V Arduino (like Due) and 5V Arduino based on AVR microcontrollers.
  • A free withdrawal is provided, reserved for future purposes.

Benefits of using the ARM core

By using a 32-bit ARM core, the Arduino Due is superior to typical 8-bit MCU boards in many ways. The most significant differences are as follows:

  • The 32-bit core allows processing 4-byte data in just one clock cycle. (For more information, see ).
  • Clock frequency - 84 MHz.
  • Volume random access memory SRAM is 96 KB.
  • The amount of flash memory programs - 512 KB.
  • The presence of a DMA controller that allows you to offload the CPU from performing resource-intensive memory operations.

Diagram, original design and pinout

Pinout: SAM3X Pinout

Nutrition

The Arduino Due can be powered from USB or from an external power source - the source type is selected automatically.

An external AC/DC adapter or battery/battery can be used as an external power source (not USB). The adapter plug (diameter - 2.1mm, center pin - positive) must be inserted into the corresponding power connector on the board. In the case of battery/battery power, its wires must be connected to the Gnd and Vin terminals of the POWER connector.

The voltage of the external power supply can be in the range from 6 to 20 V. However, a decrease in the supply voltage below 7V leads to a decrease in the voltage at the 5V pin, which can cause the device to become unstable. Using a voltage greater than 12V can lead to overheating of the voltage regulator and failure of the board. With this in mind, it is recommended to use a power supply with a voltage in the range of 7 to 12V.

The following are the power pins located on the board:

  • VIN. Voltage supplied to the Arduino directly from an external power supply (not related to 5V from USB or other regulated voltage). Through this output, you can both supply external power and consume current when the device is powered from an external adapter.
  • 5V. The output receives a voltage of 5V from the voltage regulator on the board, regardless of how the device is powered: from the adapter (7 - 12V), from USB (5V) or through the VIN pin (7 - 12V). It is not recommended to power the device through 5V or 3V3 pins, since in this case a voltage regulator is not used, which can lead to failure of the board.
  • 3v3. 3.3V coming from the voltage regulator on the board. This regulator also provides power to the SAM3X microcontroller. The maximum current drawn from this pin is 800 mA.
  • GND. Ground conclusions.
  • IOREF. This pin provides the expansion boards with information about the operating voltage of the Arduino microcontroller. Depending on the voltage read from the IOREF pin, the expansion board can switch to the appropriate power supply or use level converters, which will allow it to work with both 5V and 3.3V devices.

Memory

The SAM3X microcontroller has 512 KB of flash memory (2 blocks of 256 KB each). The device is produced with a flashed bootloader located in a separate ROM memory. The amount of available SRAM is 96 KB, which are two adjacent memory banks of 64 KB and 32 KB, respectively. All available memory(Flash, RAM and ROM) share a common linear address space.

The delete button on the board allows you to clear the Flash memory of the SAM3X microcontroller and erase the currently loaded program. To do this, press and hold it for a few seconds.

Inputs and outputs

  • Digital inputs/outputs: pins 0 - 53 Using the functions , and each of the 54 digital pins can work as an input or output. The operating voltage of these pins is 3.3V. The maximum output current of each pin ranges from 3mA to 15mA (depending on the pin), and the maximum input current ranges from 6 to 9mA (depending on the pin). All pins are paired with internal pull-up resistors (disabled by default) of 100 kΩ. In addition, some of the outputs can perform additional functions:
  • Serial Interface: Pins 0 (RX) and 1 (TX)
  • Serial 1: Pins 19 (RX) and 18 (TX)
  • Serial 2: Pins 17 (RX) and 16 (TX)
  • Serial 3: pins 15 (RX) and 14 (TX)

Used to receive (RX) and transmit (TX) serial data (TTL 3.3V voltage level). Pins 0 and 1 are connected to the corresponding pins of the ATmega16U2 chip, which acts as a USB-UART converter.

  • PWM: pins 2 to 13

The analogWrite() function can output 8-bit analog values ​​as a PWM signal. The PWM bit depth can be changed using the analogWriteResolution() function.

  • SPI interface: SPI pins(on Arduino boards ICSP connector)

With the application, these pins can communicate via the SPI interface. The SPI lines are brought out to a 6-pin connector in the center of the board, physically compatible with Uno, Leonardo and Mega2560. Please note that the SPI connector is not intended for in-circuit programming of the SAM3X microcontroller and can only be used to communicate with other SPI devices. In addition, the Arduino Due SPI has a number of additional features that can be used using special methods.

  • CAN interface: CANRX and CANTX pins

These pins support the CAN communication protocol, however, this moment its implementation in the Arduino API is not yet available.

  • "L" LED: pin 13

Built-in LED connected to pin 13. Sending a HIGH value turns the LED on, sending LOW turns it off. In addition, the brightness of the LED can be adjusted, since pin 13 can work as a PWM output.

  • TWI interface 1: pins 20 (SDA) and 21 (SCL)
  • TWI 2 interface: SDA1 and SCL1 pins

With the use of these pins can communicate via the TWI interface.

  • Analog inputs: pins A0 - A11
  1. The Arduino Due has 12 analog inputs, each of which can represent an analog voltage as a 12-bit number (4096 values). The bit depth of the ADC that interacts with these pins is set to 10 bits by default (for compatibility with other Arduino boards). You can change the resolution of the ADC using the AnalogReadResolution function. Voltages can be applied to the analog inputs of the Arduino Due in the range from 0 to 3.3V. If a higher voltage is applied, the SAM3X microcontroller may fail. The AnalogReference () function in the Arduino Due is ignored.

On the board, the AREF pin is connected to the SAM3X reference voltage pin via a resistor bridge. To use the AREF pin, you need to desolder the BR1 resistor.

  • DAC1 and DAC2

Analog outputs of a 12-bit digital-to-analogue converter. Using the analogWrite() function, 4096 different voltage levels can be generated. These pins can be used to create an audio output to see the Audio Library.

Other pins on the board:

  • AREF

ADC reference voltage. Used by the analogReference() function.

  • reset

Formation of a low level (LOW) on this pin will reset the microcontroller. Typically, this pin is used to operate the reset button on expansion boards.

Connection

The Arduino Due provides a number of options for communicating with a computer, another Arduino, or other microcontrollers, as well as with various devices, such as phones, tablets, cameras, etc. The SAM3X microcontroller has one hardware UART and three hardware USARTs for implementing serial interfaces with a TTL voltage level of 3.3V.

The USB port for programming on the board interacts with the ATmega16U2 chip, which acts as a USB-UART converter, which, when connected to a computer, is defined as a virtual COM port. (For correct identification on Windows systems, an .inf file is required; on systems with OSX and LINUX, the board is automatically recognized). The 16U2 chip is connected to the hardware UART transceiver of the SAM3X microcontroller. To program the microcontroller through the ATmega16U2 chip, the RX0 and TX0 pins are used. The Arduino software package includes special program, which allows you to read and send simple text data to the Arduino. When transferring data through the USB-UART converter chip during a USB connection with a computer, the RX and TX LEDs on the board will blink. (Serial communication via pins 0 and 1, without using a USB converter, will not light these LEDs.)

The standard USB port on the board is also connected to the SAM3X controller and is designed for serial (CDC) data transfer via USB. This port allows Arduino to interact with various applications on the computer (for example, Serial Monitor, etc.). Using the stock USB port when connected to a computer allows the Arduino Due to function as a USB mouse or keyboard. For more information about this, see the help for the Mouse and Keyborad libraries.

The stock USB port can also act as a USB host and supports connection peripherals such as mice, keyboards or smartphones. For more information about this, see the USBHost library help.

The SAM3X microcontroller also supports TWI and SPI serial interfaces. IN software Arduino includes the Wire library, which makes it easier to work with the I2C bus; see the documentation for more details. To work with the SPI interface, use the SPI library.

Programming

The process of uploading programs to the SAM3X microcontroller is different from the process of flashing AVR microcontrollers used in other Arduino boards. A feature of SAM3X is that in order to flash it, you must first clear the controller's Flash memory. This need is due to the fact that the process of loading the program is controlled by the bootloader in the SAM3X ROM, which starts only if the program is not in the Flash memory of the microcontroller.

Thus, any of the USB ports can be used to flash the board. However, it is recommended to use the USB port for programming ("Programming Port" in the figure) due to some features of the process of clearing the memory of the microcontroller:

  • Programming Port: To use this port in the Arduino IDE as a working board, select "Arduino Due (Programming Port)". Connect the Due to your computer by connecting the USB cable to the programming connector (located closer to the power connector). The programming port interacts with the 16U2 chip, which acts as a USB-UART converter. The 16U2 chip, in turn, is connected to the first UART of the SAM3X microcontroller (pins RX0 and TX0), and also controls its Reset and Erase pins. When the port is opened and closed at 1200 baud, an active level is formed on the Erase and Reset pins, which leads to clearing the microcontroller's memory. Thus, the so-called "hardware cleaning" procedure is triggered before interacting with the SAM3X UART. This method is more reliable than "software cleaning" when using a standard USB port, and works even if the processor freezes. That is why it is recommended to use the programming port for flashing the Arduino Due.
  • Native USB Port: To use this port in the Arduino IDE as a working board, select "Arduino Due (Naive USB Port)". The stock USB port is connected directly to the SAM3X microcontroller. Connect the Due to your computer by connecting the USB cable to the stock USB connector (located closer to the reset button). Opening and closing the port at 1200 baud will trigger a "software clear" procedure that clears the flash memory, reboots the microcontroller, and starts the bootloader. Since this procedure is performed exclusively by the program of the SAM3X microcontroller itself, if the latter freezes, the cleaning process may not occur. At the same time, opening / closing the standard port at different speeds will not help to restart the microcontroller.

Unlike other Arduino boards that use avrdude to program, the Arduino Due is flashed using the .

Source firmware for the ATmega16U2 microcontroller is available in the Arduino repository. You can flash the microcontroller through the ISP in-circuit programming connector using an external programmer (in this case, the DFU bootloader will be overwritten).

USB overload protection

The Arduino Due has resettable fuses that protect the computer's USB port from short circuits and overloads. Although most computers have their own protection, these fuses provide an additional layer of protection. If more than 500 mA is drawn from the USB port, the fuse will automatically disconnect the connection until the cause is corrected. short circuit or overload.

Physical Specifications and Compatibility with Expansion Cards

The maximum length and width of the Arduino Due PCB are 10.2 cm and 5.4 cm respectively, including the USB connectors and the power connector protruding from the board. Three mounting holes allow you to attach the board to a surface or chassis. Note that the distance between digital pins 7 and 8 is not a multiple of the traditional 2.54mm and is 4mm.

The Arduino Due is designed to be compatible with most Uno, Diecimila or Duemilanove expansion boards. The location of the main pins of the board is completely equivalent: digital pins 0 - 13 (as well as adjacent pins AREF and GND), analog inputs 0 - 5, the POWER connector and the "ICSP" (SPI) connector - all pins are located at the same distance relative to each other. Also, the main UART transceiver lines are connected to the same pins (0 and 1). Please note that the I2C pin numbers on the Arduino Due (20 and 21) are different from the Duemilanove / Diecimila pin numbers (analog inputs 4 and 5).

General information

The Arduino Due is a device based on the Atmel SAM3X8E ARM Cortex-M3 microprocessor (datasheet). This is the first Arduino board based on a 32-bit ARM microcontroller. It consists of 54 digital outputs (of which 12 can work as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial transceivers), an 84 MHz clock generator, USB with OTG technology, 2 DAC (digital-to-analog converters), 2 TWI, power connector, SPI connector, JTAG connector, reset button and memory clear button.

Note: Unlike other Arduino boards, the Arduino Due's operating voltage is 3.3V. Accordingly, the maximum voltage that its outputs can withstand is 3.3V. Applying a higher voltage to the output (for example, 5V) can lead to failure of the board.

The device includes everything necessary to ensure the operation of the microcontroller; To get started, simply supply power from an AC/DC adapter or battery, or connect it to a computer via a USB cable. The Arduino Due is compatible with all 3.3V powered expansion boards and conforms to pinout requirements 1.0:

  • The SDA and SCL (TWI) pins are located near the AREF pin.
  • There is an IOREF pin that allows expansion boards to adjust to the Arduino's operating voltage. Due to this, expansion boards can be compatible with both 3.3V Arduino (like Due) and 5V Arduino based on AVR microcontrollers.
  • A free withdrawal is provided, reserved for future purposes.

Benefits of using the ARM core

By using a 32-bit ARM core, the Arduino Due is superior to typical 8-bit MCU boards in many ways. The most significant differences are as follows:

  • The 32-bit core allows processing 4-byte data in just one clock cycle. (For more information, see the description of the int type).
  • Clock frequency - 84 MHz.
  • The amount of SRAM memory is 96 KB.
  • The amount of flash memory programs - 512 KB.
  • The presence of a DMA controller that allows you to offload the CPU from performing resource-intensive memory operations.

Diagram, original design and pinout

Characteristics

microcontroller AT91SAM3X8E
Working voltage 3.3V
Supply voltage (recommended) 7-12V
Supply voltage (limit) 6-16V
Digital outputs 54 (of which 12 can work as PWM outputs)
Analog inputs 12
Analog outputs 2 (DAC)
Total output current of all terminals (maximum) 130 mA
Maximum output current output 3.3V 800 mA
Maximum output current output 5V 800 mA
Flash memory 512 KB is fully available to user programs
SRAM 96 KB (two memory banks: 64 KB and 32 KB)
Clock frequency 84 MHz

Nutrition

The Arduino Due can be powered from USB or from an external power source - the source type is selected automatically.

An external AC/DC adapter or battery/battery can be used as an external power source (not USB). The adapter plug (diameter - 2.1mm, center pin - positive) must be inserted into the corresponding power connector on the board. In the case of battery/battery power, its wires must be connected to the Gnd and Vin terminals of the POWER connector.

The voltage of the external power supply can be in the range from 6 to 20 V. However, a decrease in the supply voltage below 7V leads to a decrease in the voltage at the 5V pin, which can cause the device to become unstable. Using a voltage greater than 12V can lead to overheating of the voltage regulator and failure of the board. With this in mind, it is recommended to use a power supply with a voltage in the range of 7 to 12V.

The following are the power pins located on the board:

  • VIN. Voltage supplied to the Arduino directly from an external power supply (not related to 5V from USB or other regulated voltage). Through this output, you can both supply external power and consume current when the device is powered from an external adapter.
  • 5V. The output receives a voltage of 5V from the voltage regulator on the board, regardless of how the device is powered: from the adapter (7 - 12V), from USB (5V) or through the VIN pin (7 - 12V). It is not recommended to power the device through 5V or 3V3 pins, since in this case a voltage regulator is not used, which can lead to failure of the board.
  • 3v3. 3.3V coming from the voltage regulator on the board. This regulator also provides power to the SAM3X microcontroller. The maximum current drawn from this pin is 800 mA.
  • GND. Ground conclusions.
  • IOREF. This pin provides the expansion boards with information about the operating voltage of the Arduino microcontroller. Depending on the voltage read from the IOREF pin, the expansion board can switch to the appropriate power supply or use level converters, which will allow it to work with both 5V and 3.3V devices.

Memory

The SAM3X microcontroller has 512 KB of flash memory (2 blocks of 256 KB each). The device is produced with a flashed bootloader located in a separate ROM memory. The amount of available SRAM is 96 KB, which are two adjacent memory banks of 64 KB and 32 KB, respectively. All available memory (Flash, RAM, and ROM) shares a common linear address space.

The delete button on the board allows you to clear the Flash memory of the SAM3X microcontroller and erase the currently loaded program. To do this, press and hold it for a few seconds.

Inputs and outputs

  • Digital inputs/outputs: pins 0 - 53
  • SPI interface: SPI pins(on Arduino boards ICSP connector)
  • CAN interface: CANRX and CANTX pins

These pins support the CAN communication protocol, but there is currently no implementation of it in the Arduino API.

  • "L" LED: pin 13

Built-in LED connected to pin 13. Sending a HIGH value turns the LED on, sending LOW turns it off. In addition, the brightness of the LED can be adjusted, since pin 13 can work as a PWM output.

  • TWI interface 1: pins 20 (SDA) and 21 (SCL)
  • TWI 2 interface: SDA1 and SCL1 pins

Other pins on the board:

  • AREF

ADC reference voltage. Used by the analogReference() function.

  • reset

Formation of a low level (LOW) on this pin will reset the microcontroller. Typically, this pin is used to operate the reset button on expansion boards.

Connection

The Arduino Due provides a range of options for communicating with a computer, another Arduino or other microcontrollers, as well as various devices such as phones, tablets, cameras, etc. The SAM3X microcontroller has one hardware UART and three hardware USARTs for implementing serial interfaces with a TTL voltage level of 3.3V.

The USB port for programming on the board interacts with the ATmega16U2 chip, which acts as a USB-UART converter, which, when connected to a computer, is defined as a virtual COM port. (For correct identification on Windows systems, an .inf file is required; on systems with OSX and LINUX, the board is automatically recognized). The 16U2 chip is connected to the hardware UART transceiver of the SAM3X microcontroller. To program the microcontroller through the ATmega16U2 chip, the RX0 and TX0 pins are used. The Arduino software package includes a special program that allows you to read and send simple text data to the Arduino. When transferring data through the USB-UART converter chip during a USB connection with a computer, the RX and TX LEDs on the board will blink. (Serial communication via pins 0 and 1, without using a USB converter, will not light these LEDs.)

The SAM3X microcontroller also supports TWI and SPI serial interfaces. The Arduino software includes the Wire library, which makes it easier to work with the I2C bus; see the documentation for more details. To work with the SPI interface, use the SPI library.

Programming

The process of uploading programs to the SAM3X microcontroller is different from the process of flashing AVR microcontrollers used in other Arduino boards. A feature of SAM3X is that in order to flash it, you must first clear the controller's Flash memory. This need is due to the fact that the process of loading the program is controlled by the bootloader in the SAM3X ROM, which starts only if the program is not in the Flash memory of the microcontroller.

Thus, any of the USB ports can be used to flash the board. However, it is recommended to use the USB port for programming ("Programming Port" in the figure) due to some features of the process of clearing the memory of the microcontroller:

  • Programming Port: To use this port in the Arduino IDE as a working board, select "Arduino Due (Programming Port)". Connect the Due to your computer by connecting the USB cable to the programming connector (located closer to the power connector). The programming port interacts with the 16U2 chip, which acts as a USB-UART converter. The 16U2 chip, in turn, is connected to the first UART of the SAM3X microcontroller (pins RX0 and TX0), and also controls its Reset and Erase pins. When the port is opened and closed at 1200 baud, an active level is formed on the Erase and Reset pins, which leads to clearing the microcontroller's memory. Thus, the so-called "hardware cleaning" procedure is triggered before interacting with the SAM3X UART. This method is more reliable than "software cleaning" when using a standard USB port, and works even if the processor freezes. That is why it is recommended to use the programming port for flashing the Arduino Due.
  • Native USB Port: To use this port in the Arduino IDE as a working board, select "Arduino Due (Naive USB Port)". The stock USB port is connected directly to the SAM3X microcontroller. Connect the Due to your computer by connecting the USB cable to the stock USB connector (located closer to the reset button). Opening and closing the port at 1200 baud will trigger a "software clear" procedure that clears the flash memory, reboots the microcontroller, and starts the bootloader. Since this procedure is performed exclusively by the program of the SAM3X microcontroller itself, if the latter freezes, the cleaning process may not occur. At the same time, opening / closing the standard port at different speeds will not help to restart the microcontroller.

Unlike other Arduino boards that use avrdude to program, the Arduino Due is flashed using the .

The firmware source code for the ATmega16U2 microcontroller is available in the Arduino repository. You can flash the microcontroller through the ISP in-circuit programming connector using an external programmer (in this case, the DFU bootloader will be overwritten).

USB overload protection

The Arduino Due has resettable fuses that protect the computer's USB port from short circuits and overloads. Although most computers have their own protection, these fuses provide an additional layer of protection. If more than 500 mA is drawn from the USB port, the fuse will automatically disconnect the connection until the cause of the short circuit or overload is corrected.

Physical Specifications and Compatibility with Expansion Cards

The maximum length and width of the Arduino Due PCB are 10.2 cm and 5.4 cm respectively, including the USB connectors and the power connector protruding from the board. Three mounting holes allow you to attach the board to a surface or chassis. Note that the distance between digital pins 7 and 8 is not a multiple of the traditional 2.54mm and is 4mm.

The Arduino Due is designed to be compatible with most Uno, Diecimila or Duemilanove expansion boards. The location of the main pins of the board is completely equivalent: digital pins 0 - 13 (as well as adjacent pins AREF and GND), analog inputs 0 - 5, the POWER connector and the "ICSP" (SPI) connector - all pins are located at the same distance relative to each other. Also, the main UART transceiver lines are connected to the same pins (0 and 1). Please note that the I2C pin numbers on the Arduino Due (20 and 21) are different from the Duemilanove / Diecimila pin numbers (analog inputs 4 and 5).

Detailed instructions for working with the Arduino Due (in English)

The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU . It is the first Arduino board based on a 32-bit ARM core microcontroller.

On this page... ()

Use your Arduino Due on the Arduino Web IDE

All Arduino boards, including this one, work out-of-the-box on the , no need to install anything.

The Arduino Web Editor is hosted online, therefore it will always be up-to-date with the latest features and support for all boards. Follow this to start coding on the browser and upload your sketches onto your board.

Use your Arduino Due on the Arduino Desktop IDE

If you want to program your Arduino Due while offline you need to install the and add the Atmel SAMD Core to it. This simple procedure is done selecting Tools menu, then boards and last Board Manager, as documented in the page.
Attach the USB micro side of the USB cable to the Due's Programming port (this is the port closer to the DC power connector). To upload a sketch, choose Arduino Due (Programming port) from the Tools > Board menu in the Arduino IDE, and select the correct serial port from the Tools > Serial Port menu.

Installing the Arduino Sam Boards core

If you are using the Arduino IDE version 1.6.2 or newer you need to install the core that supports the Arduino Due. Please follow to install the new core.

Installing Drivers for the Due

OS X
  • No driver installation is necessary on OSX. Depending on the version of the OS you"re running, you may get a dialog box asking you if you wish to open the “Network Preferences". Click the "Network Preferences..." button, then click "Apply". The Due will show up as “Not Configured”, but it is still working.
Windows (tested on XP and 7)
linux
  • No driver installation is necessary for Linux.

Select your board and port

The uploading process on the Arduino Due works the same as other boards from a user's standpoint. It is recommended to use the Programming port for uploading sketches, though you can upload sketches on either of the USB ports.

port follow this steps:

  • Connect your board to the computer by attaching the USB cable to the Due's Programming port (this is the port closer to the DC power connector).
  • In the "Tools" menu choose "Serial Port" and select the serial port of the Due
  • Under the "Tools > Boards" menu select "Arduino Due (Programming port)"

Open your first sketch

Everything is now ready to upload your first sketch. Go to File on the Arduino Software (IDE) and open the Examples tree; select 01.Basic and then Blink

This sketch just flashes the built in LED connected to Digital pin 13 at one second pace for on and off, but it is very useful to practice the loading of a sketch into the Arduino Software (IDE) and the Upload to the connected board.

Upload the program

Press the second round icon from left on the top bar of the Arduino Software (IDE) or press Ctrl+U or select the menu Sketch and then Upload.

Learn more on the Desktop IDE

When using the Due as a host, it will be providing power to the attached device. It is strongly recommended to use the DC power connector when acting as a host.

ADC and PWM resolutions

The Due has the ability to change its default analog read and write resolutions (10-bits and 8-bits, respectively). It can support up to 12-bit ADC and PWM resolutions. See the and pages for information.

Expanded SPI functionality

The Due has expanded functionality on its SPI bus, useful for communicating with multiple devices that speak at different speeds. See the for more details.

Last revision2017/01/10 by SM

The text of the Arduino getting started guide is licensed under a Creative Commons Attribution-ShareAlike 3.0 License . Code samples in the guide are released into the public domain.