Developed With Arduino Due


This article provides a brief introduction to the Arduino Due boards. We are start with the hardware and finish with an explaination of the entire procedure for the development and testing of a simple sketch. We will see the following in the order:

  • Hardware features
  • Installation of the libraries needed for development
  • Parameter settings
  • Example project
  • Conclusion

Hardware features

Arduino Due is based on an AT91SAM3X8E processor, Cortex-ME CPU and is the first card of this family-based 32-bit ARM microcontroller. At the hardware level, it has less than 54 pins for I / O, data transmission and reception, analog inputs and much more. The following is the pin mapping and other hardware components:

  • 12 pin can be used as PWM outputs
  • 12 analog inputs
  • 16 digital inputs
  • 4 UARTs serial port hardware
  • 2 pin DAC
  • 2 TWI
  • Jack for power
  • Port Mini USB native
  • Port Mini USB programmable
  • Outputs GND, 3.3 and 5 volt power supply for external components
  • SPI Header
  • JTAG Header
  • Reset button
  • Button for cancellation (erase) the sketch in memory

Here is a preview of the Arduino Due.

Arduino shield
Figure 1: Arduino shield

Besides the fact that Arduino Due are based on a 32bit ARM, there are still differences with other boards. Its running requires an operating voltage of 3.3V instead of 5, so avoid voltages higher than the nominal, since there is the risk of damaging the entire board.

We have said previously, that it has two mini USB ports:

  • Native USB SAM3X: for when we want to use the Arduino Due as a normal device, take example from a PC that uses peripherals such as mouse and keyboard, or even as a host and allows other devices to connect to it again through this port.
  • Programming ATmega16U2: used to upload sketches of code, in other words for its programming.

Ethernet shield
Figure 2:
Ethernet shield

And also compatible with all Arduino shields and components used on the Arduino Uno, provided that the Pin-out is the same, a practical example is that we can connect the Ethernet shield used on the Arduino Uno since the pin-out is perfectly compatible as shown in the figure.

Pin out is perfectly
Figure 3: Pin out is perfectly

For more details on the hardware, see the following this link, where you can find more information and details about it.

Installing libraries needed for development

Now that we know the main hardware features, it is time to move to the development. This, however, involves certain procedures to be performed. First, download and install the Arduino IDE when the latest version is 1.6.4. After installation, if you try to start the Arduino IDE, we realize that one of the available boards is not on the Board section the opportunity to select Arduino Due. Why all this? We simply must download and install all the necessary libraries. Let's start, first we start the IDE development in the tools menu. Choose the Tools command and Boards as shown.

Installing libraries
Figure 4: Installing libraries

We will be conducted in the Boards Manager screen, where you can download libraries for Arduino Due and the others, since we have libraries for the family of Intel boards for example.

Libraries for family Intel boards
Figure 5: Libraries for family Intel boards

We are interested in knowing how to download the libraries under the heading Arduino SAM Boards (32-bit ARM Cortex-M3), select it.

Arduino SAM Boards
Figure 6: Arduino SAM Boards

Before you download we still need to select the version of the IDE, we select the latest version installed.

Board manager
Figure 7: Board Manager

We will begin the installation process, you will download the tools needed and more files of the definitions of the boards, as shown in the following images.

Downloading boards
Figure 8: Downloading boards

Downloading all the necessary files
Figure 9: Downloading all the necessary files

After downloading all the necessary files, start the installation process of the boards and tools.

Installation process
Figure 10: Installation process

Boards and tools
Figure 11: Boards and tools

After installation, if everything goes well, we will show in the screen the Boards Manager the word "INSTALLED" as shown.

Screen Boards Manager
Figure 12:
Screen Boards Manager

We now have everything you need in the software development to start with the Arduino Due, however we still must do a few things before you start to program it.

Parameter settings

After installation, we must now go to select as the default tab Arduino Due and still select the serial port to connect the board, otherwise we cannot transfer any content. Let's see how to proceed. We will start the Arduino IDE. In the Tools menu select Board again and unlike before, we can in the bottom of the menu item select the Arduino Due. We note that we have two choices that we're interested in and the first is the Arduino Due (the Programming Port), because as said earlier, we must not use the card as a peripheral or host, but rather we need to program it.

Programming Port
Figure 13: Programming Port

After this activity, we still need to select the serial port, always from the Tools menu. Select this time the words Port and set the correct one, in my case COM4, but generally Arduino Due uses this serial port, as shown in the figure.

Serial port
Figure 14: Serial port

Sample project

Also set the serial port, we are ready to create a sketch of the example, in reference to this article written previously, connect an Ethernet shield to the Arduino Due as shown earlier in this article, but then we connect the Port Programming Arduino Two at the USB port of our PC that will provide voltage to both boards.

Set the serial port
Figure 15: Set the serial port

Now we upload the sketch of the code that you find in the article specified above, who will make the active Ethernet shield.

  1. // Importo le librerie Ethernet  
  2. #include <SPI.h>  
  3. #include <Ethernet.h>  
  4. // Impostazioni base  
  5. byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // MAC address  
  6. void setup()  
  7. {  
  8.      // Imposto una connessione seriale per verificare i dati.  
  9.      Serial.begin(9600);  
  10.     // Diamo alla Ethernet shield un secondo per inizializzarsi  
  11.      delay(1000);       
  12. }  
  13. void loop()  
  14. {  
  15.      // Connessione Ethernet usando MAC e IP fisso  
  16.          if(Ethernet.begin(mac) == 0)   
  17.          {  
  18.            Serial.println("Connesso");  
  19.          }  
  21.          else  
  22.          {  
  23.            Serial.println("Errore nella connessione");  
  24.          }     
  25. }  
With the key Load, identifiable by the symbol of an arrow to the right, we can finally send the code on the board we provided previously. This is the procedure for loading, as shown in the following images.

 Procedure for loading 3
Figure 16: Procedure for loading 1

 Procedure for loading 2
Figure 17: Procedure for loading 2

Procedure for loading 1 
Figure 18: Procedure for loading 3

If everything was done correctly, we need to see the word Charging completed as shown by the last image.


In this short article, we wanted to show in general and Arduino Due, starting from the main characteristics Hardware, libraries and boards necessary to be able to program, we saw what the procedure is to select the board and serial port, then ending with a small sketch of an example and then send everything to the board, so that you can view in a network the Ethernet shield, said as compatible with the Arduino Due.


Up Next
    Ebook Download
    View all
    View all