Main.ArduinoBoardDue History

Hide minor edits - Show changes to output

December 10, 2015, at 10:53 AM by Luca Cipriani -
Changed line 308 from:
<li><b>"L" LED: 13 </b><br>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.</li>
to:
<li><b>"L" LED: 13 </b><br>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 output.</li>
October 13, 2015, at 07:16 PM by Helena Bisby -
Changed lines 103-105 from:
<div class="box blue">SAM</div>

to:
<div class="box blue">ARM Core</div>

October 13, 2015, at 07:15 PM by Helena Bisby -
Changed lines 103-105 from:
<div class="box blue">ARM Core</div>

to:
<div class="box blue">SAM</div>

September 28, 2015, at 10:06 AM by Helena Bisby -
Deleted lines 371-374:

<div>
Because of the way the Yún handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by pressing the reset button on the board.
</div>
September 18, 2015, at 06:58 PM by Alice Pintus -
Changed line 334 from:
The Programming port is connected to an ATmega16U2, which provides a virtual COM port to software on a connected computer (To recognize the device, Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically.). The 16U2 is also connected to the SAM3X hardware UART. Serial on pins RX0 and TX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).
to:
The Programming port is connected to an ATmega16U2, which provides a virtual COM port to software on a connected computer (To recognize the device, Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically). The 16U2 is also connected to the SAM3X hardware UART. Serial on pins RX0 and TX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).
September 18, 2015, at 06:55 PM by Alice Pintus -
Deleted line 124:
<br>The Due has a <a href="http://arduino.cc/forum/index.php/board,87.0.html">dedicated forum</a> for discussing the board.
Changed line 142 from:
<li>On the Software <a href="https://forum.arduino.cc/index.php?board=87.0">on the Due Forum</a></li>
to:
<li>On the Software <a href="https://forum.arduino.cc/index.php?board=87.0">on the Arduino Forum</a></li>
September 18, 2015, at 06:36 PM by Helena Bisby -
Added line 315:
</ul>
Added line 317:
<ul class="text-indent">
September 18, 2015, at 06:30 PM by Helena Bisby -
Deleted line 261:
The LilyPad Arduino USB can be powered via the micro USB connection or with a 3.7V LiPo battery (connected to the JST connector on the board). Either power source is regulated down to the operating voltage (3.3V) by the on-board MIC5219.
September 18, 2015, at 06:28 PM by Helena Bisby -
Deleted lines 253-259:


<div>
<div class="subtitle">Power</div>
The Arduino Due can be powered via the USB connector or with an external power supply. The power source is selected automatically.
</div>
Changed lines 255-262 from:
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
to:
<div class="subtitle">ARM Core Benefits</div>
<ul class="text-indent">
<li>A 32-bit core, that allows operations on 4 bytes wide data within a single CPU clock. (for more information go to <a href="/en/Reference/Int">int type</a> page).</li>
<li>CPU Clock at 84Mhz.</li>
<li>96 KBytes of SRAM.</li>
<li>512 KBytes of Flash memory for code.</li>
<li>A DMA controller, that can relieve the CPU from doing memory intensive tasks. </li>
The LilyPad Arduino USB can be powered via the micro USB connection or with a 3.7V LiPo battery (connected to the JST connector on the board). Either power source is regulated down to the operating voltage (3.3V) by the on-board MIC5219.
Changed lines 264-269 from:
to:

<div>
<div class="subtitle">Power</div>
The Arduino Due can be powered via the USB connector or with an external power supply. The power source is selected automatically.
</div>
Changed line 271 from:
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
to:
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
Changed line 273 from:
to:
Added lines 275-278:
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
</div>

<div>
September 18, 2015, at 06:25 PM by Helena Bisby -
Changed line 76 from:
<a href="http://store-usa.arduino.cc/products/abx00003" rel="nofollow"><button class="button orange-button">SHOP NOW</button></a>
to:
<a href="http://store.arduino.cc/index.php?main_page=product_info&cPath=11_12&products_id=243" rel="nofollow"><button class="button orange-button">SHOP NOW</button></a>
September 18, 2015, at 06:17 PM by Helena Bisby -
Deleted line 49:
Added line 51:
Changed line 58 from:
> Arduino LilyPad USB
to:
> Arduino Due
Changed lines 65-66 from:
<img class="header-image" src="/en/uploads/Main/E000017_landing.jpg">
to:
<img class="header-image" src="/en/uploads/Main/A000062_featured.jpg">
Changed line 68 from:
<div class="titolo">Arduino LilyPad USB</div>
to:
<div class="titolo">Arduino Due</div>
Changed line 70 from:
The Arduino LilyPad USB is the perfect board for e-textiles and wearables projects. It can be sewn to fabric and similarly mounted power supplies, sensors and actuators with conductive thread. You can attach this board directly to your computer using only a micro USB cable.
to:
The Arduino Due is the first Arduino board based on a 32-bit ARM core microcontroller. With 54 digital input/output pins, 12 analog inputs, it is the perfect board for powerful larger scale Arduino projects.
Changed lines 75-76 from:
<a href="/en/Guide/ArduinoLilyPadUSB" rel="nofollow"><button class="button blue-button">GETTING STARTED</button></a>
<a href="http://store.arduino.cc/index.php?main_page=product_info&cPath=30&products_id=287" rel="nofollow"><button class="button orange-button">SHOP NOW</button></a>
to:
<a href="/en/Guide/ArduinoDue" rel="nofollow"><button class="button blue-button">GETTING STARTED</button></a>
<a href="http://store-usa.arduino.cc/products/abx00003" rel="nofollow"><button class="button orange-button">SHOP NOW</button></a>
Deleted line 91:
Changed lines 101-105 from:
<div class="box orange">8-bit</div>
<div class="box brown">8 MHz</div>
<div class="box blue">AVR</div>

to:
<div class="box orange">32-bit</div>
<div class="box brown">84 MHz</div>
<div class="box blue">ARM Core</div>

Changed lines 109-110 from:
The LilyPad Arduino USB is a microcontroller board based on the <a href="http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf">ATmega32u4</a>. It has 9 digital input/output pins (of which 4 can be used as PWM outputs and 4 as analog inputs), an 8 MHz resonator, a micro USB connection, a JST connector for a 3.7V LiPo battery, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a battery to get started.
</div>
to:
The Arduino Due is a microcontroller board based on the <a href="http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf">Atmel SAM3X8E ARM Cortex-M3 CPU</a>. It is the first Arduino board based on a 32-bit ARM core microcontroller. It has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2 DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button and an erase button.
</div>
Changed line 112 from:
The LilyPad Arduino USB differs from previous LilyPad boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a separate USB-to-serial adapter. This allows the LilyPad Arduino USB to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port. It also has other implications for the behavior of the board; these are detailed on the <a href="/en/Guide/ArduinoLilyPadUSB">Getting Started</a> page.
to:
<b>Warning: Unlike most Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Applying voltages higher than 3.3V to any I/O pin could damage the board. </b>
Changed line 114 from:
to:
Changed line 116 from:
You can find your board warranty information <a href="/en/Main/warranty">here</a>.
to:
The board contains everything needed to support the microcontroller; simply connect it to a computer with a micro-USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.
Changed lines 119-121 from:
<div class="subtitle">Getting Started</div>
In the <a href="/en/Guide/ArduinoLilyPadUSB">Getting Started section</a>, you can find all the information you need to configure your board,
use the <a href="/en/Main/Software">Arduino Software (IDE)</a>, and start to tinker with coding and electronics.
to:
The Due follows the 1.0 pinout:
<ul class="text-index">
<li><b>TWI</b>: SDA and SCL pins that are near to the AREF pin.</li>
<li><b>IOREF</b>: allows an attached shield with the proper configuration to adapt to the voltage provided by the board. This enables shield compatibility with a 3.3V board like the Due and AVR-based boards which operate at 5V.</li>
<li>An unconnected pin, reserved for future use.</li>
</ul>
<br>The Due has a <a href="http://arduino.cc/forum/index.php/board,87.0.html">dedicated forum</a> for discussing the board.
Changed lines 128-132 from:
<div class="subtitle">Need Help?</div>
<ul class="textindent">
<li>On Projects <a href="http://lilypadarduino.org/?cat=15">on the LilyPad Website</a></li>
<li>On the Product itself through <a href="https://store.arduino.cc/index.php?main_page=contact_us&language=en">our Customer Support</a></li>
</ul>
to:
You can find your board warranty information <a href="/en/Main/warranty">here</a>.
Changed lines 130-135 from:
</div>


<div id="techspecs">
<div class="title1margintop">Technical specs</div>
<div class="textsummary">
to:
<div>
<div class="subtitle">Getting Started</div>
In the <a href="/en/Guide/ArduinoDue">Getting Started section</a>, you can find all the information you need to configure your board,
use the <a href="/en/Main/Software">Arduino Software (IDE)</a>, and start to tinker with coding and electronics.
</div>
<div>
<div class="subtitle">Get Inspired</div>
Looking for ideas? Use your Arduino Due with an Arduino Motor Shield <a href="/en/Tutorial/DueMotorShieldDC">in this tutorial</a>, <a href="/en/Tutorial/DueSimpleWaveformGenerator">make a simple waveform generator</a> using the Arduino Due and its DAC features, and a <a href="/en/Tutorial/SimpleAudioPlayer">simple audio player</a>.
Changed lines 139-159 from:
<table>
to:
</div>
<div>
<div class="subtitle">Need Help?</div>
<ul class="textindent">
<li>On the Software <a href="https://forum.arduino.cc/index.php?board=87.0">on the Due Forum</a></li>
<li>On Projects <a href="https://forum.arduino.cc/index.php?board=3.0">on the Arduino Forum</a></li>
<li>On the Product itself through <a href="https://store.arduino.cc/index.php?main_page=contact_us&language=en">our Customer Support</a></li>
</ul>
</div>
</div>
</div>


<div id="techspecs">
<div class="title1margintop">Technical specs</div>
<div class="textsummary">

<table>

<tr><strong>AVR Arduino microcontroller</strong></tr>
Changed line 164 from:
<td><a href="http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf">ATmega32u4</a></a></td>
to:
<td>AT91SAM3X8E </td>
Changed lines 166-167 from:
<tr>
to:

<tr>
Added line 171:
Changed lines 173-174 from:
<td>Input Voltage</td>
<td>3.8V-5V</td>
to:
<td>Input Voltage (recommended)</td>
<td>7-12V</td>
Deleted line 175:
Added lines 177-180:
<td>Input Voltage (limits)</td>
<td>6-16V</td>
</tr>
<tr>
Changed line 182 from:
<td>9</td>
to:
<td>54 (of which 12 provide PWM output)</td>
Added line 185:
Changed lines 187-188 from:
<td>PWM Channels</td>
<td>4</td>
to:
<td>Analog Input Pins</td>
<td>12</td>
Deleted line 189:
Changed lines 191-192 from:
<td>Analog Input Channels</td>
<td>4</td>
to:
<td>Analog Output Pins</td>
<td>2 (DAC)</td>
Added line 195:
Changed lines 197-198 from:
<td>DC Current per I/O Pin</td>
<td>40 mA</td>
to:
<td>Total DC Output Current on all I/O lines</td>
<td>130 mA</td>
Deleted line 199:
Changed lines 201-202 from:
<td>Flash Memory</td>
<td>32 KB (ATmega32u4) of which 4 KB used by bootloader</td>
to:
<td>DC Current for 3.3V Pin</td>
<td>800 mA</td>
Deleted line 203:
Changed lines 205-206 from:
<td>SRAM</td>
<td>2.5 KB (ATmega32u4)</td>
to:
<td>DC Current for 5V Pin</td>
<td>800 mA</td>
Changed lines 210-211 from:
<td>EEPROM</td>
<td>1 KB (ATmega32u4)</td>
to:
<td>Flash Memory</td>
<td>512 KB all available for the user applications</td>
Added lines 215-218:
<td>SRAM</td>
<td>96 KB (two banks: 64KB and 32KB)</td>
</tr>
<tr>
Changed line 220 from:
<td>8 MHz</td>
to:
<td>84 MHz</td>
Added lines 222-235:
<tr>
<td>Length</td>
<td>101.52 mm</td>
</tr>
<tr>
<td>Width</td>
<td>53.3 mm</td>
</tr>
<tr>
<td>Weight</td>
<td>36 g</td>
</tr>

Deleted line 237:
Changed line 249 from:
Arduino LilyPad USB is open-source hardware! You can build your own board using the following files:
to:
Arduino Due is open-source hardware! You can build your own board using the following files:
Changed lines 252-254 from:
<a href="/en/uploads/Main/arduino-lilypad-usb-schematic.pdf"><div class="rectdocumentation brown"><div class="immrect"><img src="/en/uploads/Main/schematicsfile.svg" alt="PDF" style="width:48px; height:48px;"></div><div class="textrect margin">SCHEMATICS<br> IN .PDF</div></div></a>
<a href="/en/uploads/Main/arduino-lilypad-usb-reference-design.zip"><div class="rectdocumentation yellow"><div class="immrect"><img src="/en/uploads/Main/eaglefile.svg" alt="EAGLE" style="width:48px; height:48px;"></div><div class="textrect margin">EAGLE FILE<br> IN .ZIP</div></div></a>
to:
<a href="/en/uploads/Main/arduino-Due-schematic.pdf"><div class="rectdocumentation blue"><div class="immrect"><img src="/en/uploads/Main/schematicsfile.svg" alt="PDF" style="width:48px; height:48px;"></div><div class="textrect margin">SCHEMATICS<br> IN .PDF</div></div></a>
<a href="/en/uploads/Main/arduino-Due-Reference-design.zip"><div class="rectdocumentation yellow"><div class="immrect"><img src="/en/uploads/Main/eaglefile.svg" alt="EAGLE" style="width:48px; height:48px;"></div><div class="textrect margin">EAGLE FILE<br> IN .ZIP</div></div></a>

Changed lines 257-264 from:
<div class="subtitle">ARM Core Benefits</div>
<ul class="text-indent">
<li>A 32-bit core, that allows operations on 4 bytes wide data within a single CPU clock. (for more information go to <a href="/en/Reference/Int">int type</a> page).</li>
<li>CPU Clock at 84Mhz.</li>
<li>96 KBytes of SRAM.</li>
<li>512 KBytes of Flash memory for code.</li>
<li>A DMA controller, that can relieve the CPU from doing memory intensive tasks. </li>
The LilyPad Arduino USB can be powered via the micro USB connection or with a 3.7V LiPo battery (connected to the JST connector on the board). Either power source is regulated down to the operating voltage (3.3V) by the on-board MIC5219.
to:
<div class="subtitle">Power</div>
The Arduino Due can be powered via the USB connector or with an external power supply. The power source is selected automatically.
Changed line 262 from:
The board can be turned on and off with the on-board switch. With the switch in the ON position, the microcontroller receives power and the board runs. With the switch in the "CHG" position, the microcontroller doesn't receive power. (This is true whether the board is powered via USB or a battery.)
to:
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.
Changed lines 264-271 from:



<div>
<div class="subtitle">Power</div>
The LilyPad Arduino USB can be powered via the micro USB connection or with a 3.7V LiPo battery (connected to the JST connector on the board). Either power source is regulated down to the operating voltage (3.3V) by the on-board MIC5219.
</div>
to:
Changed line 266 from:
The board can be turned on and off with the on-board switch. With the switch in the ON position, the microcontroller receives power and the board runs. With the switch in the "CHG" position, the microcontroller doesn't receive power. (This is true whether the board is powered via USB or a battery.)
to:
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
Changed lines 268-269 from:

to:
Deleted line 269:
The board contains a MCP73831 LiPo battery charging chip. If the board is connected to both USB and a battery, the USB power will charge the battery. This is true regardless of the position of the switch. The LED above the word "CHG" lights up while the battery is being charged. The charging will stop automatically when the battery is fully charged.<br><br>
Changed lines 272-273 from:
<li><b>+ </b>The regulated 3.3V power supply used to power the microcontroller and other components on the board. This can come either from the USB connection or a battery, both via the on-board regulator. This pin is only powered when the on-board switch is in the ON position.</li>
<li><b>-</b> Ground pin.</li>
to:
<li><b>Vin.</b> 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.</li>
<li><b>5V</b>.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.</li>
<li><b>3V3</b>. 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.</li>
<li><b>GND</b>. Ground pins.</li>
<li><b>IOREF</b>. This pin on the Arduino board 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.</li>
Changed line 282 from:
The ATmega32u4 has 32 KB (with 4 KB used for the bootloader). It also has 2.5 KB of SRAM and 1 KB of EEPROM (which can be read and written with the <a href="/en/Reference/EEPROM">EEPROM library</a>).
to:
The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code. The bootloader is preburned 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) can be accessed directly as a flat addressing space.
Deleted lines 283-284:

Changed lines 285-286 from:
<div class="subtitle">Input and Output</div>
Each of the 9 digital i/o pins on the LilyPad Arduino USB can be used as an input or output, using <a href="/en/Reference/PinMode">pinMode()</a>, <a href="/en/Reference/DigitalWrite">digitalWrite()</a>, and <a href="/en/Reference/DigitalRead">digitalRead()</a> functions. They operate at 3.3V volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms.
to:
It is possible to erase the Flash memory of the SAM3X with the onboard erase button. This will remove the currently loaded sketch from the MCU. To erase, press and hold the Erase button for a few seconds while the board is powered.
Changed line 287 from:
to:
Changed lines 289-290 from:
In addition, some pins have specialized functions:<br><br>
to:
<div class="subtitle">Input and Output</div>
Changed lines 292-301 from:
<li><b>TWI</b>: 2 (SDA) and 3 (SCL). Support a simple TWI communication using the <a href="/en/Reference/Wire"> Wire library</a>.</li>
<li><b>External Interrupts</b>: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the <a href="/en/Reference/AttachInterrupt">attachInterrupt()</a> function for details.</li>
<li><b>PWM</b>: 3, 9, 10, 11, and 13. Provide 8-bit PWM output with the <a href="/en/Reference/AnalogWrite">analogWrite()</a> function.</li>
<li><b>LED</b>: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.</li>
<li><b>Analog Inputs:</b> A2-A5. The LilyPad Arduino USB has 4 analog inputs, labeled A0 through A11, all of which can also be used as digital i/o. Each analog input provide 10 bits of resolution (i.e. 1024 different values). By default the analog inputs measure from ground to 5 volts, though is it possible to change the upper end of their range using the <a href="/en/Reference/AnalogReference">analogReference()</a> function.</li>
</ul>
<br><br>
See also the mapping between Arduino pins and ATmega32u4 ports.<br><br>
<a href="/en/Hacking/PinMapping32u4"><div class="rectdocumentation green"><div class="immrect"><img src="/en/uploads/Main/pin_mapping.svg" alt="PIN_MAPPING" style="width:55px; height:46px;"></div><div class="textrect">PIN MAPPING<br>ATmega32u4</div> </div></a>
</div>
to:
<li><b>Digital I/O: pins from 0 to 53</b> </li>
<li>Each of the 54 digital pins on the Due can be used as an input or output, using <a href="/en/Reference/PinMode">pinMode()</a>, <a href="/en/Reference/DigitalWrite">digitalWrite()</a>, and <a href="/en/Reference/DigitalRead">digitalRead()</a> functions. They operate at 3.3 volts. Each pin can provide (source) a current of 3 mA or 15 mA, depending on the pin, or receive (sink) a current of 6 mA or 9 mA, depending on the pin. They also have an internal pull-up resistor (disconnected by default) of 100 KOhm. In addition, some pins have specialized functions:</li>
<li><b>Serial: 0 (RX) and 1 (TX)</b></li>
<li><b>Serial 1: 19 (RX) and 18 (TX)</b></li>
<li><b>Serial 2: 17 (RX) and 16 (TX)</b></li>
<li><b>Serial 3: 15 (RX) and 14 (TX) </b><br> 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.</li>
<li><b>PWM: Pins 2 to 13 </b><br>Provide 8-bit PWM output with the <a href="/en/Reference/AnalogWrite">analogWrite()</a> function. the resolution of the PWM can be changed with the <a href="/en/Reference/AnalogWriteResolution">analogWriteResolution() function.</a></li>
<li><b>SPI: SPI header (ICSP header on other Arduino boards)</b> <br> These pins support SPI communication using the <a href="/en/Reference/SPI">SPI library</a>. 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 <a href="/en/Reference/DueExtendedSPI">Extended SPI methods for Due.</a></li>
<li><b>CAN: CANRX and CANTX</b><br> These pins support the CAN communication protocol but are not not yet supported by Arduino APIs.</li>
<li><b>"L" LED: 13 </b><br>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.</li>
<li><b>TWI 1: 20 (SDA) and 21 (SCL)</b></li>
<li><b>TWI 2: SDA1 and SCL1. </b><br>Support TWI communication using the Wire library. SDA1 and SCL1 can be controlled using the Wire1 class provided by the <a href="/en/Reference/Wire">Wire library</a>. While SDA and SCL have internal pullup resistors, SDA1 and SCL1 have not. Adding two pullup resistor on SDA1 and SCL1 lines is required for using Wire1.</li>
<li><b>Analog Inputs: pins from A0 to A11 </b><br>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 <a href="/en/Reference/AnalogReadResolution">analogReadResolution()</a>. The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more than 3.3V on the Due’s pins will damage the SAM3X chip. The analogReference() function is ignored on the Due.</li>
The AREF pin is connected to the SAM3X analog reference pin through a resistor bridge. To use the AREF pin, resistor BR1 must be desoldered from the PCB.
<li><b>DAC1 and DAC2 </b><br>These pins provides true analog outputs with 12-bits resolution (4096 levels) with the <a href="/en/Reference/AnalogWrite">analogWrite()</a> function. These pins can be used to create an audio output using the <a href="/en/Reference/Audio">Audio library.</a></li>
Other pins on the board:
<li><b>AREF </b><br>Reference voltage for the analog inputs. Used with <a href="/en/Reference/AnalogReference">analogReference()</a>.</li>
<li><b>Reset </b><br>Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.</li>
</ul>
</div>


<div>
See also the mapping between Arduino pins and SAM3X ports:<br><br>
<a href="/en/Hacking/PinMappingSAM3X"><div class="rectdocumentation green"><div class="immrect"><img src="/en/uploads/Main/pin_mapping.svg" alt="PIN_MAPPING" style="width:55px; height:46px;"></div><div class="textrect">PIN MAPPING<br>SAM3X</div> </div></a>
</div>
Changed lines 321-325 from:
The LilyPad Arduino USB has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The 32U4 also allows for serial (CDC) communication over USB and appears as a virtual com port to software on the computer. The chip also acts as a full speed USB 2.0 device, using standard USB COM drivers. On Windows, a <a href="/en/Guide/Windows#toc4">.inf file is required</a>>. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB connection to the computer.
</div>

<div>
A <a href="/en/Reference/SoftwareSerial">SoftwareSerial library</a> allows serial communication on any of the LilyPad's digital pins.
to:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers, and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART and three hardware USARTs for TTL (3.3V) serial communication.
Changed lines 323-333 from:
<div>
The LilyPad Arduino USB also supports I2C (TWI). The Arduino software includes a <a href="/en/Reference/Wire">Wire Library</a> to simplify use of the I2C bus.
</div>
<div>The LilyPad Arduino USB appears as a generic keyboard and mouse, and can be programmed to control these input devices using the <a href="/en/Reference/MouseKeyboard">Keyboard and Mouse</a> classes.
</div>

<div>
<div class="subtitle">Programming</div>
The Arduino LilyPad USB can be programmed with the Arduino <a href="/en/Main/Software">Arduino Software</a> (IDE). Select "LilyPad Arduino USB" from the <b>Tools > Board</b> menu (according to the microcontroller on your board). For details, see the <a href="/en/Reference/HomePage">reference</a> and <a href="/en/Tutorial/HomePage">tutorials</a>.
</div>
to:
Changed line 325 from:
The ATmega32U4 on the LilyPad Arduino USB comes preburned with <a href="/en/Hacking/Bootloader?from=Tutorial.Bootloader">bootloader</a> that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the AVR109 protocol.
to:
The Programming port is connected to an ATmega16U2, which provides a virtual COM port to software on a connected computer (To recognize the device, Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically.). The 16U2 is also connected to the SAM3X hardware UART. Serial on pins RX0 and TX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).
Deleted line 326:
Changed line 328 from:
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header. While the holes are too small to insert pins into, you can insert male header pins into the ISP connector on your programmer and press them against the ICSP header on the board (from above).<br><br>
to:
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. It also enables the Due to emulate a USB mouse or keyboard to an attached computer. To use these features, see the <a href="/en/Reference/MouseKeyboard">Mouse and Keyboard library reference pages</a>.
Changed lines 330-331 from:

to:
Changed lines 332-333 from:
<div class="subtitle">Automatic (Software) Reset and Bootloader Initialisation</div>
Rather than requiring a physical press of the reset button before an upload, the LilyPad Arduino USB is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the LilyPad's virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the LilyPad Arduino USB twice in quick in succession. Pressing the reset button once will reset the board and jump directly to the user sketch, bypassing the bootloader. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader.
to:
The Native USB port can also act as a USB host for connected peripherals such as mice, keyboards, and smartphones. To use these features, see the <a href="/en/Reference/USBHost">USBHost reference pages</a>.
Changed line 335 from:
Because of the way the LilyPad Arduino USB handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by pressing the reset button on the board twice in quick succession.
to:
The SAM3X also supports TWI and SPI communication. The Arduino software includes a Wire library to simplify use of the TWI bus; see the <a href="/en/Reference/Wire">documentation for details. For SPI communication, use the <a href="/en/Reference/SPI">SPI library</a>.
Changed line 337 from:
to:
Changed lines 339-340 from:
<div class="subtitle">Physical Characteristics</div>
The LilyPad Arduino USB is a circle, approximately 50mm (2") in diameter. The Micro USB connector extends slightly beyond this diameter. The board itself is .8mm (1/32") thick (approximately 6.5mm (1/4") including components, the tallest of which is the JST battery connector).
to:
<div class="subtitle">Programming</div>
The Due can be programmed with the Arduino <a href="/en/Main/Software">Arduino Software</a> (IDE). For details, see the <a href="/en/Reference/HomePage">reference</a> and <a href="/en/Tutorial/HomePage">tutorials</a>.
Changed lines 342-375 from:
to:

<div>
Uploading 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.
</div>
<img src="/en/uploads/Main/DueUSBPorts.jpg">
<div>
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 :
<ul class="textindent">
<li>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.</li>
<li>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.</li>
</ul>
Unlike other Arduino boards which use avrdude for uploading, the Due relies on <a href="http://sourceforge.net/projects/b-o-s-s-a/">bossac</a>.<br><br>
The ATmega16U2 firmware source code is available in the <a href="http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/">Arduino repository</a>. You can use the ISP header with an external programmer (overwriting the DFU bootloader). See this <a href="http://arduino.cc/forum/index.php/topic,111.0.html">user-contributed tutorial</a> for more information.

</div>


<div>
<div class="subtitle">USB Overcurrent Protection</div>
The Arduino Due has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. 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.
</div>

<div>
Because of the way the Yún handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by pressing the reset button on the board.
</div>

<div>
<div class="subtitle">Physical Characteristics and Shield Compatibility</div>
The maximum length and width of the Arduino Due PCB are 4 and 2.1 inches respectively, with the USB connectors and power jack extending beyond the former dimension. Three screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
</div>
<div>
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1). <i><b>Please note that I2C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5)</b></i>.

</div>
Added line 383:
Deleted lines 384-385:

Deleted line 385:
</div>
September 18, 2015, at 06:16 PM by Helena Bisby -
Changed lines 1-185 from:
!!Arduino Due

(:table border=0 align=center:)

(:cellnr colspan=2:)%width=450px%[[Attach:ArduinoDue_Front.jpg | Attach:ArduinoDue_Front_450px.jpg ]]
(:cell colspan=2:)%width=450px%[[Attach:ArduinoDue_Back.jpg |Attach:ArduinoDue_Back_450px.jpg ]]
(:cellnr colspan=2:) ''Arduino Due Front''
(:cell colspan=2:) ''Arduino Due Back''

(:tableend:)

(:table border = 0 :)
(:cell:) [[http://store.arduino.cc/it/index.php?main_page=product_info&cPath=11_12&products_id=243 | Attach:buttonStore.jpg ]]
(:tableend:)

!!!Overview

The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf | datasheet]]). It is the first Arduino board based on a 32-bit ARM core microcontroller. It has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2 DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button and an erase button.

'''[++Warning++]: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board'''.

The board contains everything needed to support the microcontroller; simply connect it to a computer with a micro-USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.

The Due follows the 1.0 pinout:
* TWI: SDA and SCL pins that are near to the AREF pin.
* The IOREF pin which allows an attached shield with the proper configuration to adapt to the voltage provided by the board. This enables shield compatibility with a 3.3V board like the Due and AVR-based boards which operate at 5V.
* An unconnected pin, reserved for future use.

The Due has a [[http://arduino.cc/forum/index.php/board,87.0.html | dedicated forum]] for discussing the board.

!!!Get Inspired
Looking for ideas? Use your Arduino Due with an Arduino Motor Shield [[ en/Tutorial/DueMotorShieldDC | in this tutorial]], [[en/Tutorial/DueSimpleWaveformGenerator | make a simple waveform generator ]] using the Arduino Due and its DAC features, and a [[/en/Tutorial/SimpleAudioPlayer | simple audio player]].

!!!ARM Core benefits

The Due has a 32-bit ARM core that can outperform typical 8-bit microcontroller boards. The most significant differences are:

* A 32-bit core, that allows operations on 4 bytes wide data within a single CPU clock. (for more information look [[Reference/Int | int type]] page).
* CPU Clock at 84Mhz.
* 96 KBytes of SRAM.
* 512 KBytes of Flash memory for code.
* a DMA controller, that can relieve the CPU from doing memory intensive tasks.

!!!Schematic, Reference Design & Pin Mapping

EAGLE files: [[Attach:arduino-Due-Reference-design.zip | arduino-Due-reference-design.zip]]

Schematic: [[Attach:arduino-Due-schematic.pdf | arduino-Due-schematic.pdf]]

Pin Mapping: [[Hacking/PinMappingSAM3X | SAM3X Pin Mapping page ]]

!!!Summary

||border=0
||Microcontroller || ||AT91SAM3X8E ||
||Operating Voltage || ||3.3V ||
||Input Voltage (recommended) || ||7-12V ||
||Input Voltage (limits) || ||6-16V ||
||Digital I/O Pins || ||54 (of which 12 provide PWM output) ||
||Analog Input Pins || ||12 ||
||Analog Outputs Pins || ||2 (DAC) ||
||Total DC Output Current on all I/O lines || ||130 mA ||
||DC Current for 3.3V Pin || ||800 mA ||
||DC Current for 5V Pin || ||800 mA ||
||Flash Memory || ||512 KB all available for the user applications ||
||SRAM || ||96 KB (two banks: 64KB and 32KB) ||
||Clock Speed || ||84 MHz ||
||Length || ||101.52 mm ||
||Width || ||53.3 mm ||
||Weight || ||36 g ||

!!!Power

The Arduino Due can be powered via the USB connector or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. 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.''' 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 on the Arduino board 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.

!!!Memory

The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code. The bootloader is preburned 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) can be accessed directly as a flat addressing space.

It is possible to erase the Flash memory of the SAM3X with the onboard erase button. This will remove the currently loaded sketch from the MCU. To erase, press and hold the Erase button for a few seconds while the board is powered.

!!!Input and Output

* '''Digital I/O: pins from 0 to 53''' \\
Each of the 54 digital pins on the Due can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 3.3 volts. Each pin can provide (source) a current of 3 mA or 15 mA, depending on the pin, or receive (sink) a current of 6 mA or 9 mA, depending on the pin. They also have an internal pull-up resistor (disconnected by default) of 100 KOhm. In addition, some pins have specialized functions:

* '''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)''' \\
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.

(:if false:)
* '''External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2).''' These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the [[Reference/AttachInterrupt | attachInterrupt()]] function for details.
(:ifend:)

* '''PWM: Pins 2 to 13''' \\
Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function. the resolution of the PWM can be changed with the [[Reference/AnalogWriteResolution | analogWriteResolution()]] function.

* '''SPI: SPI header''' (ICSP header on other Arduino boards) \\
These pins support SPI communication using the [[Reference/SPI | 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 [[Reference/DueExtendedSPI | 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 1: 20 (SDA) and 21 (SCL)'''
* '''TWI 2: SDA1 and SCL1.''' \\
Support TWI communication using the [[Reference/Wire | Wire library]]. SDA1 and SCL1 can be controlled using the Wire1 class provided by the Wire library. While SDA and SCL have internal pullup resistors, SDA1 and SCL1 have not. Adding two pullup resistor on SDA1 and SCL1 lines is required for using Wire1.

* '''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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more than 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, resistor BR1 must be desoldered from the PCB.

*'''DAC1 and DAC2''' \\
These pins provides true analog outputs with 12-bits resolution (4096 levels) with the [[Reference/AnalogWrite | analogWrite()]] function. These pins can be used to create an audio output using the [[Reference/Audio | Audio library]].

Other pins on the board:

* '''AREF''' \\
Reference voltage for the analog inputs. Used with [[Reference/AnalogReference | analogReference]]().

* '''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.

!!!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, cameras and so on. The SAM3X provides one hardware UART and three hardware USARTs for TTL (3.3V) serial communication.

The Programming port is connected to an ATmega16U2, which provides a virtual COM port to software on a connected computer (To recognize the device, Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically.). The 16U2 is also connected to the SAM3X hardware UART. Serial on pins RX0 and TX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

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. It also enables the Due to emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].

The Native USB port can also act as a USB host for connected peripherals such as mice, keyboards, and smartphones. To use these features, see the [[/Reference/USBHost | USBHost reference pages]].

The SAM3X also supports TWI and SPI communication. The Arduino software includes a Wire library to simplify use of the TWI bus; see the [[Reference/Wire | documentation]] for details. For SPI communication, use the [[Reference/SPI | SPI library]].

!!!Programming

The Arduino Due can be programmed with the Arduino software ([[Main/SoftwareDue | download]]). For details, see the [[Reference/HomePage | reference]] and [[Tutorial/HomePage | tutorials]].

Uploading 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.

Attach:DueUSBPorts.jpg

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 [[http://sourceforge.net/projects/b-o-s-s-a/ | bossac]].

The ATmega16U2 firmware source code is available [[http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/ | in the Arduino repository]]. You can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://arduino.cc/forum/index.php/topic,111.0.html | this user-contributed tutorial]] for more information.

!!!USB Overcurrent Protection

The Arduino Due has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. 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.

!!!Physical Characteristics and Shield Compatibility

The maximum length and width of the Arduino Due PCB are 4 and 2.1 inches respectively, with the USB connectors and power jack extending beyond the former dimension. Three screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.

The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''

(:div id='commentsbox':)
to:
(:html:)
<style>
table tr:nth-child(odd) { background-color: #f6fafa;}
#wikitext .product-page .buttons.chinese{ margin-right: 180px;}

.product-page-header {
position: relative;
width: 100%;
display: inline-block;
padding: 0;
}
.header-image {
width: 54%;
}
.product-page-header div.text-column {
top: 40px;
}
div.description {
white-space: normal;
}
div.description, div.titolo {
margin-left: 40px;
}
div.titolo {
line-height: 40px;
margin-bottom: 20px;
margin-top: 20px;
}
div.product-page div.container-buttons {
margin: 35px 0 0 40px;
}
#wikitext .product-page .buttons {
text-align: center;
margin: 0;
position: relative;
display: inline-block;
width: auto;
}
div.buttons .blue-button, div.buttons .orange-button, div.buttons a {
position: relative;
float: left;
}
#wikitext .product-page .buttons a:last-child {
margin-left: 0;
}
div.buttons .blue-button {
margin-right: 10px;
line-height: 14px;
}

</style>
<div class="product-page">
<div class="subHeader row">

<div class="breadcrumb columns large-10 medium-10">
<p>
<a class="wikilink" href="/en/Main/Products">Arduino Products</a>
> Arduino LilyPad USB
</p>
</div>
</div>

<div class="product-page-header">

<img class="header-image" src="/en/uploads/Main/E000017_landing.jpg">

<div class="text-column">
<div class="titolo">Arduino LilyPad USB</div>
<div class="description">
The Arduino LilyPad USB is the perfect board for e-textiles and wearables projects. It can be sewn to fabric and similarly mounted power supplies, sensors and actuators with conductive thread. You can attach this board directly to your computer using only a micro USB cable.
</div>

<div class="container-buttons">
<div class="buttons">
<a href="/en/Guide/ArduinoLilyPadUSB" rel="nofollow"><button class="button blue-button">GETTING STARTED</button></a>
<a href="http://store.arduino.cc/index.php?main_page=product_info&cPath=30&products_id=287" rel="nofollow"><button class="button orange-button">SHOP NOW</button></a>
</div>
</div>

</div>



</div>

<div class="row">
<div class="large-2 medium-2 columns menu">
<ul class="product-page-nav">
<li><a href="#overview">Overview</a></li>
<li><a href="#techspecs">Technical Specs</a></li>
<li><a href="#documentation">Documentation</a></li>

</ul>
</div>

<div class="large-10 medium-10 columns">

<div id="overview">
<div class="title1margintop">Overview</div>

<div class="box red">3.3V</div>
<div class="box orange">8-bit</div>
<div class="box brown">8 MHz</div>
<div class="box blue">AVR</div>


<div class="textsummary">

<div>
The LilyPad Arduino USB is a microcontroller board based on the <a href="http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf">ATmega32u4</a>. It has 9 digital input/output pins (of which 4 can be used as PWM outputs and 4 as analog inputs), an 8 MHz resonator, a micro USB connection, a JST connector for a 3.7V LiPo battery, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a battery to get started.
</div>
<div>
The LilyPad Arduino USB differs from previous LilyPad boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a separate USB-to-serial adapter. This allows the LilyPad Arduino USB to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port. It also has other implications for the behavior of the board; these are detailed on the <a href="/en/Guide/ArduinoLilyPadUSB">Getting Started</a> page.
</div>

<div>
You can find your board warranty information <a href="/en/Main/warranty">here</a>.
</div>
<div>
<div class="subtitle">Getting Started</div>
In the <a href="/en/Guide/ArduinoLilyPadUSB">Getting Started section</a>, you can find all the information you need to configure your board,
use the <a href="/en/Main/Software">Arduino Software (IDE)</a>, and start to tinker with coding and electronics.
</div>
<div>
<div class="subtitle">Need Help?</div>
<ul class="textindent">
<li>On Projects <a href="http://lilypadarduino.org/?cat=15">on the LilyPad Website</a></li>
<li>On the Product itself through <a href="https://store.arduino.cc/index.php?main_page=contact_us&language=en">our Customer Support</a></li>
</ul>
</div>
</div>


<div id="techspecs">
<div class="title1margintop">Technical specs</div>
<div class="textsummary">

<table>
<tbody>

<tr>
<td>Microcontroller</td>
<td><a href="http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf">ATmega32u4</a></a></td>
</tr>
<tr>
<td>Operating Voltage</td>
<td>3.3V</td>
</tr>
<tr>
<td>Input Voltage</td>
<td>3.8V-5V</td>
</tr>

<tr>
<td>Digital I/O Pins</td>
<td>9</td>
</tr>

<tr>
<td>PWM Channels</td>
<td>4</td>
</tr>

<tr>
<td>Analog Input Channels</td>
<td>4</td>
</tr>

<tr>
<td>DC Current per I/O Pin</td>
<td>40 mA</td>
</tr>

<tr>
<td>Flash Memory</td>
<td>32 KB (ATmega32u4) of which 4 KB used by bootloader</td>
</tr>

<tr>
<td>SRAM</td>
<td>2.5 KB (ATmega32u4)</td>
</tr>

<tr>
<td>EEPROM</td>
<td>1 KB (ATmega32u4)</td>
</tr>

<tr>
<td>Clock Speed</td>
<td>8 MHz</td>
</tr>
</tbody>
</table>

</div>
</div>



<div id="documentation">
<div class="title1margintop">Documentation</div>
<div class="textsummary">

<div>
<div class="subtitle">OSH: Schematics</div>
Arduino LilyPad USB is open-source hardware! You can build your own board using the following files:
</div>

<a href="/en/uploads/Main/arduino-lilypad-usb-schematic.pdf"><div class="rectdocumentation brown"><div class="immrect"><img src="/en/uploads/Main/schematicsfile.svg" alt="PDF" style="width:48px; height:48px;"></div><div class="textrect margin">SCHEMATICS<br> IN .PDF</div></div></a>
<a href="/en/uploads/Main/arduino-lilypad-usb-reference-design.zip"><div class="rectdocumentation yellow"><div class="immrect"><img src="/en/uploads/Main/eaglefile.svg" alt="EAGLE" style="width:48px; height:48px;"></div><div class="textrect margin">EAGLE FILE<br> IN .ZIP</div></div></a>

<div>
<div class="subtitle">ARM Core Benefits</div>
<ul class="text-indent">
<li>A 32-bit core, that allows operations on 4 bytes wide data within a single CPU clock. (for more information go to <a href="/en/Reference/Int">int type</a> page).</li>
<li>CPU Clock at 84Mhz.</li>
<li>96 KBytes of SRAM.</li>
<li>512 KBytes of Flash memory for code.</li>
<li>A DMA controller, that can relieve the CPU from doing memory intensive tasks. </li>
The LilyPad Arduino USB can be powered via the micro USB connection or with a 3.7V LiPo battery (connected to the JST connector on the board). Either power source is regulated down to the operating voltage (3.3V) by the on-board MIC5219.
</div>

<div>
The board can be turned on and off with the on-board switch. With the switch in the ON position, the microcontroller receives power and the board runs. With the switch in the "CHG" position, the microcontroller doesn't receive power. (This is true whether the board is powered via USB or a battery.)
</div>



<div>
<div class="subtitle">Power</div>
The LilyPad Arduino USB can be powered via the micro USB connection or with a 3.7V LiPo battery (connected to the JST connector on the board). Either power source is regulated down to the operating voltage (3.3V) by the on-board MIC5219.
</div>

<div>
The board can be turned on and off with the on-board switch. With the switch in the ON position, the microcontroller receives power and the board runs. With the switch in the "CHG" position, the microcontroller doesn't receive power. (This is true whether the board is powered via USB or a battery.)
</div>


<div>
The board contains a MCP73831 LiPo battery charging chip. If the board is connected to both USB and a battery, the USB power will charge the battery. This is true regardless of the position of the switch. The LED above the word "CHG" lights up while the battery is being charged. The charging will stop automatically when the battery is fully charged.<br><br>
The power pins are as follows:<br>
<ul class="textindent">
<li><b>+ </b>The regulated 3.3V power supply used to power the microcontroller and other components on the board. This can come either from the USB connection or a battery, both via the on-board regulator. This pin is only powered when the on-board switch is in the ON position.</li>
<li><b>-</b> Ground pin.</li>
</ul>
</div>

<div>
<div class="subtitle">Memory</div>
The ATmega32u4 has 32 KB (with 4 KB used for the bootloader). It also has 2.5 KB of SRAM and 1 KB of EEPROM (which can be read and written with the <a href="/en/Reference/EEPROM">EEPROM library</a>).
</div>


<div>
<div class="subtitle">Input and Output</div>
Each of the 9 digital i/o pins on the LilyPad Arduino USB can be used as an input or output, using <a href="/en/Reference/PinMode">pinMode()</a>, <a href="/en/Reference/DigitalWrite">digitalWrite()</a>, and <a href="/en/Reference/DigitalRead">digitalRead()</a> functions. They operate at 3.3V volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms.
</div>

<div>
In addition, some pins have specialized functions:<br><br>
<ul class="textindent">
<li><b>TWI</b>: 2 (SDA) and 3 (SCL). Support a simple TWI communication using the <a href="/en/Reference/Wire"> Wire library</a>.</li>
<li><b>External Interrupts</b>: 2 and 3. These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the <a href="/en/Reference/AttachInterrupt">attachInterrupt()</a> function for details.</li>
<li><b>PWM</b>: 3, 9, 10, 11, and 13. Provide 8-bit PWM output with the <a href="/en/Reference/AnalogWrite">analogWrite()</a> function.</li>
<li><b>LED</b>: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.</li>
<li><b>Analog Inputs:</b> A2-A5. The LilyPad Arduino USB has 4 analog inputs, labeled A0 through A11, all of which can also be used as digital i/o. Each analog input provide 10 bits of resolution (i.e. 1024 different values). By default the analog inputs measure from ground to 5 volts, though is it possible to change the upper end of their range using the <a href="/en/Reference/AnalogReference">analogReference()</a> function.</li>
</ul>
<br><br>
See also the mapping between Arduino pins and ATmega32u4 ports.<br><br>
<a href="/en/Hacking/PinMapping32u4"><div class="rectdocumentation green"><div class="immrect"><img src="/en/uploads/Main/pin_mapping.svg" alt="PIN_MAPPING" style="width:55px; height:46px;"></div><div class="textrect">PIN MAPPING<br>ATmega32u4</div> </div></a>
</div>

<div>
<div class="subtitle">Communication</div>
The LilyPad Arduino USB has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The 32U4 also allows for serial (CDC) communication over USB and appears as a virtual com port to software on the computer. The chip also acts as a full speed USB 2.0 device, using standard USB COM drivers. On Windows, a <a href="/en/Guide/Windows#toc4">.inf file is required</a>>. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB connection to the computer.
</div>

<div>
A <a href="/en/Reference/SoftwareSerial">SoftwareSerial library</a> allows serial communication on any of the LilyPad's digital pins.
</div>
<div>
The LilyPad Arduino USB also supports I2C (TWI). The Arduino software includes a <a href="/en/Reference/Wire">Wire Library</a> to simplify use of the I2C bus.
</div>
<div>The LilyPad Arduino USB appears as a generic keyboard and mouse, and can be programmed to control these input devices using the <a href="/en/Reference/MouseKeyboard">Keyboard and Mouse</a> classes.
</div>

<div>
<div class="subtitle">Programming</div>
The Arduino LilyPad USB can be programmed with the Arduino <a href="/en/Main/Software">Arduino Software</a> (IDE). Select "LilyPad Arduino USB" from the <b>Tools > Board</b> menu (according to the microcontroller on your board). For details, see the <a href="/en/Reference/HomePage">reference</a> and <a href="/en/Tutorial/HomePage">tutorials</a>.
</div>

<div>
The ATmega32U4 on the LilyPad Arduino USB comes preburned with <a href="/en/Hacking/Bootloader?from=Tutorial.Bootloader">bootloader</a> that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the AVR109 protocol.
</div>

<div>
You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header. While the holes are too small to insert pins into, you can insert male header pins into the ISP connector on your programmer and press them against the ICSP header on the board (from above).<br><br>
</div>


<div>
<div class="subtitle">Automatic (Software) Reset and Bootloader Initialisation</div>
Rather than requiring a physical press of the reset button before an upload, the LilyPad Arduino USB is designed in a way that allows it to be reset by software running on a connected computer. The reset is triggered when the LilyPad's virtual (CDC) serial / COM port is opened at 1200 baud and then closed. When this happens, the processor will reset, breaking the USB connection to the computer (meaning that the virtual serial / COM port will disappear). After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the LilyPad Arduino USB twice in quick in succession. Pressing the reset button once will reset the board and jump directly to the user sketch, bypassing the bootloader. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader.
</div>
<div>
Because of the way the LilyPad Arduino USB handles reset it's best to let the Arduino software try to initiate the reset before uploading, especially if you are in the habit of pressing the reset button before uploading on other boards. If the software can't reset the board you can always start the bootloader by pressing the reset button on the board twice in quick succession.
</div>

<div>
<div class="subtitle">Physical Characteristics</div>
The LilyPad Arduino USB is a circle, approximately 50mm (2") in diameter. The Micro USB connector extends slightly beyond this diameter. The board itself is .8mm (1/32") thick (approximately 6.5mm (1/4") including components, the tallest of which is the JST battery connector).
</div>

</div>




</div>
</div>
</div>


</div>
</div>
(:htmlend:)
September 15, 2015, at 12:22 PM by Alice Pintus -
Changed lines 32-33 from:
Looking for ideas? Use your Arduino Due with an Arduino Motor Shield [[ en/Tutorial/DueMotorShieldDC | in this tutorial]], and [[en/Tutorial/DueSimpleWaveformGenerator | make a simple waveform generator ]] using the Arduino Due and its DAC features.
to:
Looking for ideas? Use your Arduino Due with an Arduino Motor Shield [[ en/Tutorial/DueMotorShieldDC | in this tutorial]], [[en/Tutorial/DueSimpleWaveformGenerator | make a simple waveform generator ]] using the Arduino Due and its DAC features, and a [[/en/Tutorial/SimpleAudioPlayer | simple audio player]].
September 03, 2015, at 01:12 PM by Alice Pintus -
Deleted line 13:
(:cell:)[[http://arduino.cc/en/Main/Buy | Attach:buttonDistributors.jpg ]]
Added lines 31-33:
!!!Get Inspired
Looking for ideas? Use your Arduino Due with an Arduino Motor Shield [[ en/Tutorial/DueMotorShieldDC | in this tutorial]], and [[en/Tutorial/DueSimpleWaveformGenerator | make a simple waveform generator ]] using the Arduino Due and its DAC features.
April 23, 2015, at 05:40 PM by Arturo -
Changed lines 19-20 from:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It is the first Arduino board based on a 32-bit ARM core microcontroller. It has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2 DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button and an erase button.
to:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf | datasheet]]). It is the first Arduino board based on a 32-bit ARM core microcontroller. It has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2 DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button and an erase button.
December 01, 2014, at 06:06 PM by Angelo Scialabba -
Changed lines 125-126 from:
Support TWI communication using the [[Reference/Wire | Wire library]]. SDA1 and SCL1 can be controlled using the Wire1 class provided by the Wire library. While SDA and SCL have internal pullup resistors SDA1 and SCL1 need external pullup resistors.
to:
Support TWI communication using the [[Reference/Wire | Wire library]]. SDA1 and SCL1 can be controlled using the Wire1 class provided by the Wire library. While SDA and SCL have internal pullup resistors, SDA1 and SCL1 have not. Adding two pullup resistor on SDA1 and SCL1 lines is required for using Wire1.
December 01, 2014, at 06:04 PM by Angelo Scialabba -
Changed lines 125-126 from:
Support TWI communication using the [[Reference/Wire | Wire library]].
to:
Support TWI communication using the [[Reference/Wire | Wire library]]. SDA1 and SCL1 can be controlled using the Wire1 class provided by the Wire library. While SDA and SCL have internal pullup resistors SDA1 and SCL1 need external pullup resistors.
November 24, 2014, at 09:25 AM by Arturo -
Changed lines 128-129 from:
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 [[Reference/AnalogReadResolution | 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.
to:
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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more than 3.3V on the Due’s pins will damage the SAM3X chip. The analogReference() function is ignored on the Due.
September 22, 2014, at 04:36 PM by Angelo Scialabba -
Changed lines 66-69 from:
||Length ||101.52 mm ||
||Width ||53.3 mm ||
||Weight ||36 g ||
to:
||Length || ||101.52 mm ||
||Width || ||53.3 mm ||
||Weight || ||36 g ||
September 22, 2014, at 04:35 PM by Angelo Scialabba -
Changed lines 66-69 from:
to:
||Length ||101.52 mm ||
||Width ||53.3 mm ||
||Weight ||36 g ||
September 02, 2013, at 12:13 PM by Roberto Guido - added link to bossac project on SourceForge
Changed lines 166-167 from:
Unlike other Arduino boards which use avrdude for uploading, the Due relies on bossac.
to:
Unlike other Arduino boards which use avrdude for uploading, the Due relies on [[http://sourceforge.net/projects/b-o-s-s-a/ | bossac]].
July 03, 2013, at 10:33 AM by Alberto Cicchi -
Changed line 56 from:
||Input Voltage (limits) || ||6-20V ||
to:
||Input Voltage (limits) || ||6-16V ||
November 23, 2012, at 05:13 PM by Roberto Guido - added comments box on bottom
Changed lines 178-180 from:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
to:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''

(:div id='commentsbox':)
November 11, 2012, at 03:06 PM by Scott Fitzgerald -
Changed lines 23-24 from:
The board contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.
to:
The board contains everything needed to support the microcontroller; simply connect it to a computer with a micro-USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.
October 26, 2012, at 05:47 PM by Federico -
Changed lines 162-163 from:
* 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 the Programming port 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.
to:
* 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.
October 26, 2012, at 05:44 PM by Federico -
Changed lines 162-163 from:
* 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.
to:
* 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 the Programming port 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.
October 26, 2012, at 01:50 PM by Federico -
Changed lines 5-6 from:
(:cellnr colspan=2:)[[Attach:ArduinoDue_Front.jpg | Attach:ArduinoDue_Front_450px.jpg ]]
(:cell colspan=2:)[[Attach:ArduinoDue_Back.jpg |Attach:ArduinoDue_Back_450px.jpg ]]
to:
(:cellnr colspan=2:)%width=450px%[[Attach:ArduinoDue_Front.jpg | Attach:ArduinoDue_Front_450px.jpg ]]
(:cell colspan=2:)%width=450px%[[Attach:ArduinoDue_Back.jpg |Attach:ArduinoDue_Back_450px.jpg ]]
October 22, 2012, at 08:29 PM by Federico -
Changed line 178 from:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
to:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
October 22, 2012, at 03:41 PM by Scott Fitzgerald -
Changed lines 146-147 from:
The Native USB port allows for serial (CDC) communication over USB. This provides a serial connection to the Serial Monitor or other applications on your computer. It also enables the Due to emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].
to:
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. It also enables the Due to emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].
Changed lines 164-165 from:
* Native port: To use this port, select "Arduino Due (Native USB Port)" as your board in the Arduino IDE. 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.
to:
* 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.
October 22, 2012, at 02:23 PM by Scott Fitzgerald -
Added lines 30-31:
The Due has a [[http://arduino.cc/forum/index.php/board,87.0.html | dedicated forum]] for discussing the board.
October 22, 2012, at 12:11 PM by Federico -
Changed lines 152-153 from:
The Arduino Due can be programmed with the Arduino software ([[Main/Software | download]]). For details, see the [[Reference/HomePage | reference]] and [[Tutorial/HomePage | tutorials]].
to:
The Arduino Due can be programmed with the Arduino software ([[Main/SoftwareDue | download]]). For details, see the [[Reference/HomePage | reference]] and [[Tutorial/HomePage | tutorials]].
October 22, 2012, at 11:59 AM by Federico -
Changed line 13 from:
(:cell:) [[http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=11_12&products_id=195 | Attach:buttonStore.jpg ]]
to:
(:cell:) [[http://store.arduino.cc/it/index.php?main_page=product_info&cPath=11_12&products_id=243 | Attach:buttonStore.jpg ]]
October 21, 2012, at 04:26 PM by Scott Fitzgerald -
Changed lines 144-145 from:
The Native USB port allows for serial (CDC) communication over USB. This enables the Due to emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].
to:
The Native USB port allows for serial (CDC) communication over USB. This provides a serial connection to the Serial Monitor or other applications on your computer. It also enables the Due to emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].
Deleted lines 153-154:
The ATmega16U2 firmware source code is available [[http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/ | in the Arduino repository]]. You can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://arduino.cc/forum/index.php/topic,111.0.html | this user-contributed tutorial]] for more information.
Added lines 156-157:
Attach:DueUSBPorts.jpg
Changed lines 160-163 from:
* Programming port: 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: 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.
to:
* 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. 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.

The ATmega16U2 firmware source code is available [[http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/ | in the Arduino repository]]. You can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://arduino.cc/forum/index.php/topic,111.0.html | this user-contributed tutorial]] for more information.
October 21, 2012, at 04:03 PM by Scott Fitzgerald -
Changed lines 144-145 from:
The Native USB port has the ability to operate as a USB-CDC connection. That is, the Due can emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].
to:
The Native USB port allows for serial (CDC) communication over USB. This enables the Due to emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].
October 21, 2012, at 03:21 PM by Scott Fitzgerald -
Changed lines 144-145 from:
The Native USB port has the ability to operate as a USB-CDC connection. That is, the Due can emulate a USB mouse or keyboard to an attached computer.
to:
The Native USB port has the ability to operate as a USB-CDC connection. That is, the Due can emulate a USB mouse or keyboard to an attached computer. To use these features, see the [[/Reference/MouseKeyboard | Mouse and Keyboard library reference pages]].
Changed line 172 from:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
to:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
October 21, 2012, at 03:18 PM by Scott Fitzgerald -
Changed lines 160-162 from:
* Programming port: 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.
to:
* Programming port: 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.
October 21, 2012, at 03:17 PM by Scott Fitzgerald - clarifying and consolidating
Changed lines 140-143 from:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to one of the onboard USB connectors (USBSerial), and three hardware USARTs for TTL (3.3V) serial communication. Serial on pins RX0 and TX0 provides Serial-to-USB communication used for programming the board through the ATmega16U2 microcontroller. The 16U2 provides a virtual COM port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically). The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

The USBSerial port connected to the SAM3X can operate as a USB-CDC connection. That is, the Due can act as a USB host for connected peripherals such as mice, keyboards, and smartphones. To use these features, see the [[/Reference/USBHost | USBHost reference pages]].
to:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers, and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART and three hardware USARTs for TTL (3.3V) serial communication.

The Programming port is connected to an ATmega16U2, which provides a virtual COM port to software on a connected computer (To recognize the device, Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically.). The 16U2 is also connected to the SAM3X hardware UART. Serial on pins RX0 and TX0 provides Serial-to-USB communication for programming the board through the ATmega16U2 microcontroller. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

The Native USB port has the ability to operate as a USB-CDC connection. That is, the Due can 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. To use these features, see the [[/Reference/USBHost | USBHost reference pages]].
Changed lines 156-175 from:
!!!Firmware upload

Opening and closing the USBSerial 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 Serial port connected to the 16u2 at 1200bps triggers a “hard erase” procedure of the SAM3x chip, activating the Erase and Reset pins on the SAM3X. This procedure is more reliable than the "soft erase" mentioned above, and should work even if the main MCU has crashed.

!!!Automatic (Software) Reset

The SAM3X microcontroller is different from AVR microcontroller because the flash memory need to be erased before being re-programmed. So this means that if you should do this procedure
manually, before pressing the upload button on the IDE you should hold the erase button on the board for a second and then the reset, after that uploading a sketch will be done succesfully.

Because this procedure is repetitive, this task is managed automatically from both the USB ports, in two different ways:

* Native port: opening and closing the native port at the magic baud rate of 1200bps trigger the "soft erase" procedure: the flash memory is erased and the board is restarted with the bootloader, but if the MCU crashed for some reason it is likely that the soft erase procedure didn’t work since its done entirely in software by the MCU itself. Opening and closing the native port at a different baudrate will not reset the SAM3X.

* Programming port: The programming port uses a USB-to-serial chip connected to the first UART of the MCU (RX0 and TX0). The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X and when you open this serial port the USB-to-Serial ectivate the Erase and Reset sequence before start to talk with the UART of the SAM3X.
This procedure is much more reliable and it should work even if the main MCU has crashed.

Rather then requiring a physical press of the reset button before an upload, the Arduino Due is designed in a way that allows it to be reset by software running on a connected computer.
to:
Uploading 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: 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: 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.
Changed line 173 from:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
to:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
October 20, 2012, at 01:15 AM by Scott Fitzgerald -
Changed lines 89-92 from:
It is possible to erase the Flash memory with the onboard erase button. This will remove the currently loaded sketch from the SAM3X.

%block red%['''MISSING: erase button that erase the flash memory''']
to:
It is possible to erase the Flash memory of the SAM3X with the onboard erase button. This will remove the currently loaded sketch from the MCU. To erase, press and hold the Erase button for a few seconds while the board is powered.
October 16, 2012, at 05:07 PM by Federico -
Changed lines 167-171 from:
* Native port: opening and closing the native port at the magic baud rate of 1200bps trigger the "soft erase" procedure: the flash memory is erased and the board is restarted with
the bootloader, but if the MCU crashed for some reason it is likely that the soft erase procedure didn’t work since its done entirely in software by the MCU itself.

* Programming port: The programming port uses a USB-to-serial chip connected to the first UART of the MCU (RX0 and TX0). The USB-to-serial chip has two pins connected to
the Reset and Erase pins of the SAM3X and when you open this serial port the USB-to-Serial ectivate the Erase and Reset sequence before start to talk with the UART of the SAM3X.
to:
* Native port: opening and closing the native port at the magic baud rate of 1200bps trigger the "soft erase" procedure: the flash memory is erased and the board is restarted with the bootloader, but if the MCU crashed for some reason it is likely that the soft erase procedure didn’t work since its done entirely in software by the MCU itself. Opening and closing the native port at a different baudrate will not reset the SAM3X.

* Programming port: The programming port uses a USB-to-serial chip connected to the first UART of the MCU (RX0 and TX0). The USB-to-serial chip has two pins connected to the Reset and Erase pins of the SAM3X and when you open this serial port the USB-to-Serial ectivate the Erase and Reset sequence before start to talk with the UART of the SAM3X.
October 16, 2012, at 04:58 PM by Federico -
Changed lines 21-22 from:
'''Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board'''.
to:
'''[++Warning++]: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board'''.
Changed lines 162-163 from:
%block red%['''MISSING: describe here the automatic 'erase' procedure''']
to:
The SAM3X microcontroller is different from AVR microcontroller because the flash memory need to be erased before being re-programmed. So this means that if you should do this procedure
manually, before pressing the upload button on the IDE you should hold the erase button on the board for a second and then the reset, after that uploading a sketch will be done succesfully.

Because this procedure is repetitive, this task is managed automatically from both the USB ports, in two different ways:

* Native port: opening and closing the native port at the magic baud rate of 1200bps trigger the "soft erase" procedure: the flash memory is erased and the board is restarted with
the bootloader, but if the MCU crashed for some reason it is likely that the soft erase procedure didn’t work since its done entirely in software by the MCU itself.

* Programming port: The programming port uses a USB-to-serial chip connected to the first UART of the MCU (RX0 and TX0). The USB-to-serial chip has two pins connected to
the Reset and Erase pins of the SAM3X and when you open this serial port the USB-to-Serial ectivate the Erase and Reset sequence before start to talk with the UART of the SAM3X.
This procedure is much more reliable and it should work even if the main MCU has crashed.
October 12, 2012, at 05:03 PM by Davide Gomba -
Deleted lines 163-164:
%block red%['''MISSING: describe here that the board doesn't automatically restart the sketch if you open the serial monitor like on the Uno''']
October 09, 2012, at 04:47 PM by Scott Fitzgerald -
Changed lines 125-126 from:
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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to a maximum value of 3.3V. The analogReference() function is ignored on the Due.
to:
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 [[Reference/AnalogReadResolution | 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, resistor BR1 must be desoldered from the PCB.
October 05, 2012, at 04:34 PM by Scott Fitzgerald -
Changed lines 125-126 from:
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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to a maximum value of 3.3V, though it is possible to set a lower analog reference value through the AREF pin and the analogReference() function.
to:
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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to a maximum value of 3.3V. The analogReference() function is ignored on the Due.
October 05, 2012, at 04:07 PM by Scott Fitzgerald -
Added lines 152-157:
!!!Firmware upload

Opening and closing the USBSerial 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 Serial port connected to the 16u2 at 1200bps triggers a “hard erase” procedure of the SAM3x chip, activating the Erase and Reset pins on the SAM3X. This procedure is more reliable than the "soft erase" mentioned above, and should work even if the main MCU has crashed.
Deleted lines 159-160:
When programming the Due with the default port through the USB-Serial connection (adjacent to the power jack), the 16u2 acts as an intermediary, doing a hardware erase and reset of the SAM3X chip. If using the USBSerial connection for
October 04, 2012, at 09:30 PM by Scott Fitzgerald -
Changed lines 125-126 from:
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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.
to:
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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to a maximum value of 3.3V, though it is possible to set a lower analog reference value through the AREF pin and the analogReference() function.
Changed lines 142-145 from:
The USBSerial port connected to the SAM3X can operate as a USB-CDC connection. That is, the Due can act as a USB host for connected peripherals such as mice, keyboards, and smartphones. To access these features, use the [[/Reference/USBHost | USBHost reference pages]].

%block red%['''MISSING: USB-CDC with SerialUSB''']
to:
The USBSerial port connected to the SAM3X can operate as a USB-CDC connection. That is, the Due can act as a USB host for connected peripherals such as mice, keyboards, and smartphones. To use these features, see the [[/Reference/USBHost | USBHost reference pages]].
Added lines 154-155:
When programming the Due with the default port through the USB-Serial connection (adjacent to the power jack), the 16u2 acts as an intermediary, doing a hardware erase and reset of the SAM3X chip. If using the USBSerial connection for
October 04, 2012, at 05:25 PM by Scott Fitzgerald -
Changed lines 21-22 from:
'''Warning: differently from other Arduino boards, the Arduino Due board runs at 3.3V, therefore the maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board'''.
to:
'''Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board'''.
Changed line 27 from:
* The IOREF pin which allows an attached shield with the proper configuration to adapt to the voltage provided by the board. This enabled compatibility with a 3.3V board like the Due as well as with AVR based boards which operate at 5V.
to:
* The IOREF pin which allows an attached shield with the proper configuration to adapt to the voltage provided by the board. This enables shield compatibility with a 3.3V board like the Due and AVR-based boards which operate at 5V.
Changed lines 46-47 from:
Pin Mapping: [[Hacking/PinMappingSAM3X | PinMapSAM3X page ]]
to:
Pin Mapping: [[Hacking/PinMappingSAM3X | SAM3X Pin Mapping page ]]
Changed lines 83-84 from:
* '''IOREF.''' This pin on the Arduino board provides the voltage reference with which the microcontroller operates. A shield can read the IOREF pin voltage can select the power source or enable voltage translators on the outputs for working with the 5V or 3.3V.
to:
* '''IOREF.''' This pin on the Arduino board 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.
Added lines 89-90:
It is possible to erase the Flash memory with the onboard erase button. This will remove the currently loaded sketch from the SAM3X.
Deleted lines 97-99:
* '''Analog Inputs: pins from A0 to A11''' \\
The Due has 12 analog inputs, each of which 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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.
Changed lines 102-103 from:
Used to receive (RX) and transmit (TX) TTL serial data (with 3.3 V level). Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.
to:
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.
Deleted lines 113-115:
*'''DAC1 and DAC2''' \\
These pins provides two real analog outputs with 12-bits resolution (4096 levels) with the [[Reference/AnalogWrite | analogWrite()]] function. These pins can be used to create an audio output using the [[Reference/Audio | Audio library]].
Added lines 124-129:
* '''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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.

*'''DAC1 and DAC2''' \\
These pins provides true analog outputs with 12-bits resolution (4096 levels) with the [[Reference/AnalogWrite | analogWrite()]] function. These pins can be used to create an audio output using the [[Reference/Audio | Audio library]].
Changed lines 140-141 from:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to RX0 and TX0, and three hardware USARTs for TTL (3.3V) serial communication. Serial on pins RX0 and TX0 also provides the Serial-to-USB communication used for programming the board through the ATmega16U2 microcontroller that provides a virtual COM port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically). The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).
to:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to one of the onboard USB connectors (USBSerial), and three hardware USARTs for TTL (3.3V) serial communication. Serial on pins RX0 and TX0 provides Serial-to-USB communication used for programming the board through the ATmega16U2 microcontroller. The 16U2 provides a virtual COM port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically). The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

The USBSerial port connected to the SAM3X can operate as a USB-CDC connection. That is, the Due can act as a USB host for connected peripherals such as mice, keyboards, and smartphones. To access these features, use the [[/Reference/USBHost | USBHost reference pages]].
Changed lines 146-147 from:
The SAM3X also supports TWI and SPI communication. The Arduino software includes a Wire library to simplify use of the TWI bus; see the [[Reference/Wire | documentation]] for details. For SPI communication, use the [[Reference/SPI | SPI library]].
to:
The SAM3X also supports TWI and SPI communication. The Arduino software includes a Wire library to simplify use of the TWI bus; see the [[Reference/Wire | documentation]] for details. For SPI communication, use the [[Reference/SPI | SPI library]].
Changed line 170 from:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
to:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
October 03, 2012, at 12:54 PM by Cristian -Vacuum- Maglie -
Added lines 89-90:
%block red%['''MISSING: erase button that erase the flash memory''']
Changed lines 138-139 from:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to RX0 and TX0, and three hardware USARTs for TTL (3.3V) serial communication. Serial0 on pins RX0 and TX0 also provides the Serial-to-USB communication used for programming the board through the ATmega16U2 microcontroller that provides a virtual COM port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically.) The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).
to:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to RX0 and TX0, and three hardware USARTs for TTL (3.3V) serial communication. Serial on pins RX0 and TX0 also provides the Serial-to-USB communication used for programming the board through the ATmega16U2 microcontroller that provides a virtual COM port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically). The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

%block red%['''MISSING: USB-CDC with SerialUSB''']
Changed lines 148-151 from:
The ATmega16U2 firmware source code is available [[http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/ | in the Arduino repository]]. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
* On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then resetting the 8U2.
* On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode. You can then use [[http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886 | Atmel's FLIP software]] (Windows) or the [[http://dfu-programmer.sourceforge.net/ | DFU programmer]] (Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285962838 | this user-contributed tutorial]] for more information.
to:
The ATmega16U2 firmware source code is available [[http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/ | in the Arduino repository]]. You can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://arduino.cc/forum/index.php/topic,111.0.html | this user-contributed tutorial]] for more information.
Changed lines 152-156 from:
Rather then requiring a physical press of the reset button before an upload, the Arduino Due is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega16U2 is connected to the reset line of the Due via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment.
This setup has other implications. When the SAM3X is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the SAM3X. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.

The Due contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213719666/all | this forum thread]] for details.
to:
%block red%['''MISSING: describe here the automatic 'erase' procedure''']

%block red%['''MISSING: describe here that the board doesn't automatically restart the sketch if you open the serial monitor like on the Uno''']

Rather then requiring a physical press of the reset button before an upload, the Arduino Due is designed in a way that allows it to be reset by software running on a connected computer.
Changed line 166 from:
The Arduino Due is designed to be compatible with most shields designed for the 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 header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). SPI is available through the ICSP header on both the Mega2560 and Duemilanove / Diecimila. ''Please note that I'^2^'C is not located on the same pins on the Mega (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
to:
The Arduino Due is designed to be compatible with most shields designed for the 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) header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). ''Please note that I'^2^'C is not located on the same pins on the Due (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
October 03, 2012, at 12:31 PM by Cristian -Vacuum- Maglie -
Changed lines 19-24 from:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It has 54 digital input/output pins (of which 16 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz crystal oscillator, two USB connections, a power jack, an ICSP header, a JTAG header, and a reset button. '''The maximum voltage that the I/O pins can provide or tolerate is 3.3V. Providing higher voltages, like 5V to an input pin could damage the board'''.

It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.

The Due has the 1.0 pinout :
* TWI SDA and SCL pins that are near to the AREF pin.
to:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It is the first Arduino board based on a 32-bit ARM core microcontroller. It has 54 digital input/output pins (of which 12 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz clock, an USB OTG capable connection, 2 DAC (digital to analog), 2 TWI, a power jack, an SPI header, a JTAG header, a reset button and an erase button.

'''Warning: differently from other Arduino boards, the Arduino Due board runs at 3.3V, therefore the maximum voltage that the I/O pins can tolerate is 3.3V. Providing higher voltages, like 5V to an I/O pin could damage the board'''.

The board contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.

The Due follows the 1.0 pinout:
* TWI: SDA and SCL pins that are near to the AREF pin.
Changed lines 29-32 from:
* Atmega 16U2 for USB-to-Serial conversion and for managing the reset and erase procedure.

The Due is the first Arduino board based on a 32-bit ARM core microcontroller.
to:
Changed lines 32-33 from:
The Due has a 32-bit ARM core and so "int" is 32-bits. On the AVRs on other Arduino boards, an int is 16 bits. For further information see the [[Reference/Int | int type]] page.
to:
The Due has a 32-bit ARM core that can outperform typical 8-bit microcontroller boards. The most significant differences are:

* A 32-bit core, that allows operations on 4 bytes wide data within a single CPU clock. (for more information look [[Reference/Int | int type]] page).
* CPU Clock at 84Mhz.
* 96 KBytes of SRAM.
* 512 KBytes of Flash memory for code.
* a DMA controller, that can relieve the CPU from doing memory intensive tasks.
Deleted line 47:
Changed lines 51-66 from:
||Microcontroller ||AT91SAM3X8E ||
||Operating Voltage ||3.3V ||
||Input Voltage (recommended) ||7-12V ||
||Input Voltage (limits) ||6-20V ||
||Digital I/O Pins ||54 (of which 16 provide PWM output) ||
||Analog Input Pins ||12 ||
||Analog Outputs Pins ||2 (DAC) ||
||Total DC Output Current on all I/O lines ||130 mA ||
||DC Current for 3.3V Pin ||800 mA ||
||DC Current for 5V Pin ||theoretical 1A, realistic 800 mA ||
||Flash Memory ||512 KB all available for the user applications ||
||SRAM ||96 KB (64 + 32 KB) ||
||DataFlash ||2 Mbit (250 KB) ||
||Clock Speed ||84 MHz ||

to:
||Microcontroller || ||AT91SAM3X8E ||
||Operating Voltage || ||3.3V ||
||Input Voltage (recommended) || ||7-12V ||
||Input Voltage (limits) || ||6-20V ||
||Digital I/O Pins || ||54 (of which 12 provide PWM output) ||
||Analog Input Pins || ||12 ||
||Analog Outputs Pins || ||2 (DAC) ||
||Total DC Output Current on all I/O lines || ||130 mA ||
||DC Current for 3.3V Pin || ||800 mA ||
||DC Current for 5V Pin || ||800 mA ||
||Flash Memory || ||512 KB all available for the user applications ||
||SRAM || ||96 KB (two banks: 64KB and 32KB) ||
||Clock Speed || ||84 MHz ||
Changed lines 67-73 from:
The Arduino Due can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.

to:
The Arduino Due can be powered via the USB connector or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts.
Changed lines 87-88 from:
The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code. The bootloader is preburned in factory from Atmel and is stored in a dedicate ROM memory. The available SRAM is 98 KB (64 + 32 KB). For saving data or variables to maintain when the Due is powered off there is a 2Mbit (250 Kbyte) external DataFlash accessible via SPI or with the '''LIBRARY'''.
to:
The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code. The bootloader is preburned 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) can be accessed directly as a flat addressing space.
Changed lines 91-94 from:
Each of the 54 digital pins on the Due can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 3.3 volts. Each pin can provide (source) a current between 3 and 15 mA or receive (sink) a current between 6 and 9 mA. They also have an internal pull-up resistor (disconnected by default) of 50-150 kohm, typically 100 kohm. In addition, some pins have specialized functions:

* '''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).''' Used to receive (RX) and transmit (TX) TTL serial data (with 3.3 V level). Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.
to:
* '''Digital I/O: pins from 0 to 53''' \\
Each of the 54 digital pins on the Due can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 3.3 volts. Each pin can provide (source) a current of 3 mA or 15 mA, depending on the pin, or receive (sink) a current of 6 mA or 9 mA, depending on the pin. They also have an internal pull-up resistor (disconnected by default) of 100 KOhm. In addition, some pins have specialized functions:

* '''Analog Inputs: pins from A0 to A11''' \\
The Due has 12 analog inputs, each of which 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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.

* '''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)''' \\
Used to receive (RX) and transmit (TX) TTL serial data (with 3.3 V level). Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.
Changed lines 107-121 from:
* '''PWM: Pins 2 to 13''' Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function. the resolution of the PWM can be changed with the [[Reference/AnalogWriteResolution | analogWriteResolution()]] function.

* '''SPI: ICSP header''' These pins support SPI communication using the [[Reference/SPI | SPI library]]. The SPI pins are broken out on the ICSP header, which is physically compatible with the Uno, Leonardo and Mega2560. The ICSP 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 [[Reference/DueExtendedSPI | Extended SPI methods for Due]].

*'''DA0 and DA1''' These pins provides two real analog outputs with 12-bits of resolution (4096 levels). These pins can be used to create an audio output, with the Audio library.

* '''CAN: CAN RX0 & TX0''' These pins support the CAN communication but are not not yet supported by Arduino APIs.

* '''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: 20 (SDA) and 21 (SCL) and on pins SDA1 and SCL1.''' Support TWI communication using the [[Reference/Wire | Wire library]].

The Due has 12 analog inputs, each of which 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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.

to:
* '''PWM: Pins 2 to 13''' \\
Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function. the resolution of the PWM can be changed with the [[Reference/AnalogWriteResolution | analogWriteResolution()]] function.

* '''SPI: SPI header''' (ICSP header on other Arduino boards) \\
These pins support SPI communication using the [[Reference/SPI | 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 [[Reference/DueExtendedSPI | Extended SPI methods for Due]].

*'''DAC1 and DAC2''' \\
These pins provides two real analog outputs with 12-bits resolution (4096 levels) with the [[Reference/AnalogWrite | analogWrite()]] function. These pins can be used to create an audio output using the [[Reference/Audio | Audio library]].

* '''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 1: 20 (SDA) and 21 (SCL)'''
* '''TWI 2: SDA1 and SCL1.''' \\
Support TWI communication using the [[Reference/Wire | Wire library]].
Changed lines 128-131 from:
* '''AREF.''' Reference voltage for the analog inputs. Used with [[Reference/AnalogReference | analogReference]]().

* '''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.
to:
* '''AREF''' \\
Reference voltage for the analog inputs. Used with [[Reference/AnalogReference | analogReference]]().

* '''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.
September 20, 2012, at 01:10 PM by Federico -
Changed lines 138-139 from:
The SAM3X contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213719666/all | this forum thread]] for details.
to:
The Due contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213719666/all | this forum thread]] for details.
September 14, 2012, at 05:15 PM by Federico -
Added lines 31-34:
!!!ARM Core benefits

The Due has a 32-bit ARM core and so "int" is 32-bits. On the AVRs on other Arduino boards, an int is 16 bits. For further information see the [[Reference/Int | int type]] page.
Added lines 42-43:

September 12, 2012, at 01:42 AM by Scott Fitzgerald - minor edits
Changed lines 19-24 from:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It has 54 digital input/output pins (of which 16 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz crystal oscillator, two USB connections, a power jack, an ICSP header, a JTAG header, and a reset button. '''The maximum voltage that the I/O pins can provide or tolerate is 3.3V. Providing higher voltages, like 5V to an input pin could damage the board'''. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all the shields that can work at 3.3V and are compliant with the 1.0 Arduino pinout. Most of them are designed for the other Arduino boards, especially for the Uno.

The Due has the 1.0 pinout, which consist in:
* TWI interface SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields that has that pin to adapt to the voltage provided from the board. This to provide that the shield is compatible with the 3.3 V board like the Due and with the other board with the AVRs which operate with 5V. The second one is a not connected pin, that is reserved for future purposes.
* Atmega 16U2 for the USB-to-Serial conversion and for manage the reset and erase procedure.
to:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It has 54 digital input/output pins (of which 16 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz crystal oscillator, two USB connections, a power jack, an ICSP header, a JTAG header, and a reset button. '''The maximum voltage that the I/O pins can provide or tolerate is 3.3V. Providing higher voltages, like 5V to an input pin could damage the board'''.

It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all Arduino shields that work at 3.3V and are compliant with the 1.0 Arduino pinout.

The Due has the 1.0 pinout :
* TWI SDA and SCL pins that are near to the AREF pin.
* The IOREF pin which allows an attached shield with the proper configuration to adapt to the voltage provided by the board. This enabled compatibility with a 3.3V board like the Due as well as with AVR based boards which operate at 5V.
* An unconnected pin, reserved for future use.
* Atmega 16U2 for USB-to-Serial conversion and for managing the reset and erase procedure.
Changed lines 68-69 from:
* '''VIN.''' 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.
to:
* '''VIN.''' 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.
Changed lines 72-73 from:
* '''3.3V.''' A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 800 mA. This regulator also provide the power supply to the SAM3X microcontroller.
to:
* '''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.
Changed lines 76-77 from:
* '''IOREF.''' This pin on the Arduino board provide the voltage reference with which the microcontroller on-board operates. The shields that adopts the IOREF pin are able to select the power source or enable voltage translators on the outputs for working with the 5V or 3.3V different boards.
to:
* '''IOREF.''' This pin on the Arduino board provides the voltage reference with which the microcontroller operates. A shield can read the IOREF pin voltage can select the power source or enable voltage translators on the outputs for working with the 5V or 3.3V.
Changed lines 84-85 from:
Each of the 54 digital pins on the Due can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 3.3 volts. Each pin can provide (source) a current between 3 and 15 mA or receive (sink) a current between 6 and 9 mA and they have an internal pull-up resistor (disconnected by default) of 50-150 kohm, typical 100 kohm. In addition, some pins have specialized functions:
to:
Each of the 54 digital pins on the Due can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 3.3 volts. Each pin can provide (source) a current between 3 and 15 mA or receive (sink) a current between 6 and 9 mA. They also have an internal pull-up resistor (disconnected by default) of 50-150 kohm, typically 100 kohm. In addition, some pins have specialized functions:
Changed lines 92-101 from:
* '''PWM: 2 to 13''' Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function.

* '''SPI: ICSP header''' These pins support SPI communication using the [[Reference/SPI | SPI library]]. The SPI pins are broken out on the ICSP header, which is physically compatible with the Uno, Leonardo and Mega2560. The ICSP header could 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 [[Reference/DueExtendedSPI | Extended SPI methods for Due]].

*'''DA0 and DA1''' These pins provides two real analog outputs with 12-bits of resolution (4096 levels). These pins, for example, could be used to create an audio output, like was done in the Audio library.

* '''CAN: CAN RX0 & TX0''' These pins support the CAN communication but still not yet implemented with the Arduino APIs.

* '''LED: 13.''' There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off. It is also possible to dimmer the LED because the digital pin 13 is also a PWM outuput.
to:
* '''PWM: Pins 2 to 13''' Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function. the resolution of the PWM can be changed with the [[Reference/AnalogWriteResolution | analogWriteResolution()]] function.

* '''SPI: ICSP header''' These pins support SPI communication using the [[Reference/SPI | SPI library]]. The SPI pins are broken out on the ICSP header, which is physically compatible with the Uno, Leonardo and Mega2560. The ICSP 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 [[Reference/DueExtendedSPI | Extended SPI methods for Due]].

*'''DA0 and DA1''' These pins provides two real analog outputs with 12-bits of resolution (4096 levels). These pins can be used to create an audio output, with the Audio library.

* '''CAN: CAN RX0 & TX0''' These pins support the CAN communication but are not not yet supported by Arduino APIs.

* '''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.
Changed lines 104-108 from:
The Due has 12 analog inputs, each of which provide 12 bits of resolution (i.e. 4096 different values). By default the resolution of the readings is set at 10 bits, agreeing with the other Arduino boards. Analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.


There are a couple of other pins on the board:
to:
The Due has 12 analog inputs, each of which 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 [[Reference/AnalogReadResolution | analogReadResolution()]]. The Due's analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.


Other pins on the board:
Changed lines 115-117 from:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and other different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to RX0 and TX0, and three hardware USARTs for TTL (3.3V) serial communication. The Serial0 on pins RX0 and TX0 also provide the Serial to USB communication used for programming the board through the ATmega16U2 microcontrolle that provides a virtual com port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega8U2/ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

to:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to RX0 and TX0, and three hardware USARTs for TTL (3.3V) serial communication. Serial0 on pins RX0 and TX0 also provides the Serial-to-USB communication used for programming the board through the ATmega16U2 microcontroller that provides a virtual COM port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically.) The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).
Deleted line 122:
August 30, 2012, at 11:56 AM by Federico -
Added line 49:
||DataFlash ||2 Mbit (250 KB) ||
August 30, 2012, at 11:53 AM by Federico -
Changed lines 75-76 from:
The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code. The bootloader is preburned in factory from Atmel and is stored in a dedicate ROM memory. The available SRAM is 98 KB (64 + 32 KB).
to:
The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code. The bootloader is preburned in factory from Atmel and is stored in a dedicate ROM memory. The available SRAM is 98 KB (64 + 32 KB). For saving data or variables to maintain when the Due is powered off there is a 2Mbit (250 Kbyte) external DataFlash accessible via SPI or with the '''LIBRARY'''.
August 30, 2012, at 11:30 AM by Federico -
Changed lines 19-21 from:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It has 54 digital input/output pins (of which 16 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, a JTAG header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with most shields designed for the other Arduino boards, especially for the Uno, or previous ones.

to:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It has 54 digital input/output pins (of which 16 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz crystal oscillator, two USB connections, a power jack, an ICSP header, a JTAG header, and a reset button. '''The maximum voltage that the I/O pins can provide or tolerate is 3.3V. Providing higher voltages, like 5V to an input pin could damage the board'''. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with all the shields that can work at 3.3V and are compliant with the 1.0 Arduino pinout. Most of them are designed for the other Arduino boards, especially for the Uno.

The Due has the 1.0 pinout, which consist in:
* TWI interface SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields that has that pin to adapt to the voltage provided from the board. This to provide that the shield is compatible with the 3.3 V board like the Due and with the other board with the AVRs which operate with 5V. The second one is a not connected pin, that is reserved for future purposes.
* Atmega 16U2 for the USB-to-Serial conversion and for manage the reset and erase procedure.
Changed line 43 from:
||Analog Outputs Pins || 2 (DAC) ||
to:
||Analog Outputs Pins ||2 (DAC) ||
Changed lines 60-64 from:
The Due has the 1.0 pinout, which consist in:
* TWI interface SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields that has that pin to adapt to the voltage provided from the board. This to provide that the shield is compatible with the 3.3 V board like the Due and with the other board with the AVRs which operate with 5V. The second one is a not connected pin, that is reserved for future purposes.
* Atmega 16U2 for the USB-to-Serial conversion and for manage the reset and erase procedure.

to:
Changed lines 67-68 from:
* '''3V3.''' A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 800 mA. This regulator also provide the power supply to the SAM3X microcontroller.
to:
* '''3.3V.''' A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 800 mA. This regulator also provide the power supply to the SAM3X microcontroller.
Added lines 71-72:
* '''IOREF.''' This pin on the Arduino board provide the voltage reference with which the microcontroller on-board operates. The shields that adopts the IOREF pin are able to select the power source or enable voltage translators on the outputs for working with the 5V or 3.3V different boards.
Changed lines 89-92 from:
* '''SPI: ICSP header''' These pins support SPI communication using the [[Reference/SPI | SPI library]]. The SPI pins are broken out on the ICSP header, which is physically compatible with the Uno, Leonardo and Mega2560. The ICSP header could be used only to communicate with other SPI devices not for programming the SAM3X with the In-Circuit-Serial-Programming technique.

*’’’DA0 and DA1’’’ These pins provides two real analog outputs with 12-bits of resolution (4096 levels). These pins, for example, could be used to create an audio output, like was done in the Audio library.
to:
* '''SPI: ICSP header''' These pins support SPI communication using the [[Reference/SPI | SPI library]]. The SPI pins are broken out on the ICSP header, which is physically compatible with the Uno, Leonardo and Mega2560. The ICSP header could 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 [[Reference/DueExtendedSPI | Extended SPI methods for Due]].

*'''DA0 and DA1''' These pins provides two real analog outputs with 12-bits of resolution (4096 levels). These pins, for example, could be used to create an audio output, like was done in the Audio library.
August 29, 2012, at 04:42 PM by Federico -
Deleted lines 9-11:
(:cell:) ''Arduino Due Front''
(:cell:) ''Arduino Due Back''
Changed lines 19-30 from:
The Arduino Due is a microcontroller board based on a 32 bit ARM architecture ([[http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf | datasheet]]). It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 12 analog inputs, a 84 MHz crystal oscillator, a micro USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.

//////////////
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.\\
{+Revision 2+} of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put into [[/Hacking/DFUProgramming8U2 | DFU mode]].\\
{+Revision 3+} of the board has the following new features:
* 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible both with the board that use the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a not connected pin, that is reserved for future purposes.
* Stronger RESET circuit.
* Atmega 16U2 replace the 8U2.

"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the reference model for the Arduino platform; for a comparison with previous versions, see the [[Main/Boards | index of Arduino boards]].
to:
The Arduino Due is a microcontroller board based on the Atmel SAM3X8E ARM Cortex-M3 CPU ([[http://www.atmel.com/Images/doc11057.pdf | datasheet]]). It has 54 digital input/output pins (of which 16 can be used as PWM outputs), 12 analog inputs, 4 UARTs (hardware serial ports), a 84 MHz crystal oscillator, a USB connection, a power jack, an ICSP header, a JTAG header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Due is compatible with most shields designed for the other Arduino boards, especially for the Uno, or previous ones.


The Due is the first Arduino board based on a 32-bit ARM core microcontroller.

!!!Schematic, Reference Design & Pin Mapping

EAGLE files: [[Attach:arduino-Due-Reference-design.zip | arduino-Due-reference-design.zip]]

Schematic: [[Attach:arduino-Due-schematic.pdf | arduino-Due-schematic.pdf]]

Pin Mapping: [[Hacking/PinMappingSAM3X | PinMapSAM3X page ]]
Changed lines 34-35 from:
||Microcontroller ||ATmega328 ||
||Operating Voltage ||5V ||
to:
||Microcontroller ||AT91SAM3X8E ||
||Operating Voltage ||3.3V ||
Changed lines 38-55 from:
||Digital I/O Pins ||14 (of which 6 provide PWM output) ||
||Analog Input Pins ||6 ||
||DC Current per I/O Pin ||40 mA ||
||DC Current for 3.3V Pin ||50 mA ||
||Flash Memory ||32 KB (ATmega328) of which 0.5 KB used by bootloader ||
||SRAM ||2 KB (ATmega328) ||
||EEPROM ||1 KB (ATmega328) ||
||Clock Speed ||16 MHz ||


!!!Schematic & Reference Design

EAGLE files: [[Attach:arduino_Uno_Rev3-02-TH.zip | arduino-uno-Rev3-reference-design.zip]] (NOTE: works with Eagle 6.0 and newer)

Schematic: [[Attach:Arduino_Uno_Rev3-schematic.pdf | arduino-uno-Rev3-schematic.pdf]]

'''Note:''' The Arduino reference design can use an Atmega8, 168, or 328, Current models use an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is identical on all three processors.
to:
||Digital I/O Pins ||54 (of which 16 provide PWM output) ||
||Analog Input Pins ||12 ||
||Analog Outputs Pins || 2 (DAC) ||
||Total DC Output Current on all I/O lines ||130 mA ||
||DC Current for 3.3V Pin ||800 mA ||
||DC Current for 5V Pin ||theoretical 1A, realistic 800 mA ||
||Flash Memory ||512 KB all available for the user applications ||
||SRAM ||96 KB (64 + 32 KB) ||
||Clock Speed ||84 MHz ||

Changed lines 51-52 from:
The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically.
to:
The Arduino Due can be powered via the USB connection or with an external power supply. The power source is selected automatically.
Added lines 57-61:
The Due has the 1.0 pinout, which consist in:
* TWI interface SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields that has that pin to adapt to the voltage provided from the board. This to provide that the shield is compatible with the 3.3 V board like the Due and with the other board with the AVRs which operate with 5V. The second one is a not connected pin, that is reserved for future purposes.
* Atmega 16U2 for the USB-to-Serial conversion and for manage the reset and erase procedure.

Changed lines 66-69 from:
* '''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.

* '''3V3.''' A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
to:
* '''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.

* '''3V3.''' A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 800 mA. This regulator also provide the power supply to the SAM3X microcontroller.
Changed lines 74-75 from:
The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the [[http://www.arduino.cc/en/Reference/EEPROM | EEPROM library]]).
to:
The SAM3X has 512 KB (2 blocks of 256 KB) of flash memory for storing code. The bootloader is preburned in factory from Atmel and is stored in a dedicate ROM memory. The available SRAM is 98 KB (64 + 32 KB).
Changed lines 78-93 from:
Each of the 14 digital pins on the Uno can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:

* '''Serial: 0 (RX) and 1 (TX).''' Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

* '''External Interrupts: 2 and 3.''' These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the [[Reference/AttachInterrupt | attachInterrupt()]] function for details.

* '''PWM: 3, 5, 6, 9, 10, and 11.''' Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function.

* '''SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).''' These pins support SPI communication using the [[Reference/SPI | SPI library]].

* '''LED: 13.''' There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the [[Reference/AnalogReference | analogReference]]() function. Additionally, some pins have specialized functionality:

* '''TWI: A4 or SDA pin and A5 or SCL pin.''' Support TWI communication using the [[Reference/Wire| Wire library]].
to:
Each of the 54 digital pins on the Due can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 3.3 volts. Each pin can provide (source) a current between 3 and 15 mA or receive (sink) a current between 6 and 9 mA and they have an internal pull-up resistor (disconnected by default) of 50-150 kohm, typical 100 kohm. In addition, some pins have specialized functions:

* '''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).''' Used to receive (RX) and transmit (TX) TTL serial data (with 3.3 V level). Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip.

(:if false:)
* '''External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2).''' These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the [[Reference/AttachInterrupt | attachInterrupt()]] function for details.
(:ifend:)

* '''PWM: 2 to 13''' Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function.

* '''SPI: ICSP header''' These pins support SPI communication using the [[Reference/SPI | SPI library]]. The SPI pins are broken out on the ICSP header, which is physically compatible with the Uno, Leonardo and Mega2560. The ICSP header could be used only to communicate with other SPI devices not for programming the SAM3X with the In-Circuit-Serial-Programming technique.

*’’’DA0 and DA1’’’ These pins provides two real analog outputs with 12-bits of resolution (4096 levels). These pins, for example, could be used to create an audio output, like was done in the Audio library.

* '''CAN: CAN RX0 & TX0''' These pins support the CAN communication but still not yet implemented with the Arduino APIs.

* '''LED: 13.''' There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off. It is also possible to dimmer the LED because the digital pin 13 is also a PWM outuput.

* '''TWI: 20 (SDA) and 21 (SCL) and on pins SDA1 and SCL1.''' Support TWI communication using the [[Reference/Wire | Wire library]].

The Due has 12 analog inputs, each of which provide 12 bits of resolution (i.e. 4096 different values). By default the resolution of the readings is set at 10 bits, agreeing with the other Arduino boards. Analog inputs pins measure from ground to 3.3 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.

Deleted lines 106-107:
See also the [[Hacking/PinMapping168 | mapping between Arduino pins and ATmega328 ports]]. The mapping for the Atmega8, 168, and 328 is identical.
Changed lines 109-114 from:
The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, [[http://arduino.cc/en/Guide/Windows#toc4 |on Windows, a .inf file is required]]. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

A [[http://www.arduino.cc/en/Reference/SoftwareSerial | SoftwareSerial library]] allows for serial communication on any of the Uno's digital pins.

The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus; see the [[Reference/Wire | documentation]] for details. For SPI communication, use the [[Reference/SPI | SPI library]].
to:
The Arduino Due has a number of facilities for communicating with a computer, another Arduino or other microcontrollers and other different devices like phones, tablets, cameras and so on. The SAM3X provides one hardware UART, connected to RX0 and TX0, and three hardware USARTs for TTL (3.3V) serial communication. The Serial0 on pins RX0 and TX0 also provide the Serial to USB communication used for programming the board through the ATmega16U2 microcontrolle that provides a virtual com port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega8U2/ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).


The SAM3X also supports TWI and SPI communication. The Arduino software includes a Wire library to simplify use of the TWI bus; see the [[Reference/Wire | documentation]] for details. For SPI communication, use the [[Reference/SPI | SPI library]].
Changed lines 116-122 from:
The Arduino Uno can be programmed with the Arduino software ([[Main/Software | download]]). Select "Arduino Uno from the '''Tools > Board''' menu (according to the microcontroller on your board). For details, see the [[Reference/HomePage | reference]] and [[Tutorial/HomePage | tutorials]].

The ATmega328 on the Arduino Uno comes preburned with a [[Tutorial/Bootloader | bootloader]] that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol ([[http://www.atmel.com/dyn/resources/prod_documents/doc2525.pdf | reference]], [[http://www.atmel.com/dyn/resources/prod_documents/avr061.zip | C header files]]).

You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header; see [[Hacking/Programmer | these instructions]] for details.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available [[ | in the Arduino repository]]. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
to:
The Arduino Due can be programmed with the Arduino software ([[Main/Software | download]]). For details, see the [[Reference/HomePage | reference]] and [[Tutorial/HomePage | tutorials]].


The ATmega16U2 firmware source code is available [[http://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/ | in the Arduino repository]]. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
Changed lines 121-123 from:
* On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode.
You can then use [[http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886 | Atmel's FLIP software]] (Windows) or the [[http://dfu-programmer.sourceforge.net/ | DFU programmer]] (Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285962838 | this user-contributed tutorial]] for more information.
to:
* On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode. You can then use [[http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886 | Atmel's FLIP software]] (Windows) or the [[http://dfu-programmer.sourceforge.net/ | DFU programmer]] (Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285962838 | this user-contributed tutorial]] for more information.
Changed lines 125-130 from:
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Uno is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Uno. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213719666/all | this forum thread]] for details.
to:
Rather then requiring a physical press of the reset button before an upload, the Arduino Due is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega16U2 is connected to the reset line of the Due via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment.
This setup has other implications. When the SAM3X is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the SAM3X. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.

The SAM3X contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213719666/all | this forum thread]] for details.
Changed lines 132-136 from:
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. 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.

!!!Physical Characteristics

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Four screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
to:
The Arduino Due has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. 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.

!!!Physical Characteristics and Shield Compatibility

The maximum length and width of the Arduino Due PCB are 4 and 2.1 inches respectively, with the USB connectors and power jack extending beyond the former dimension. Three screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.

The Arduino Due is designed to be compatible with most shields designed for the 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 header are all in equivalent locations. Further the main UART (serial port) is located on the same pins (0 and 1), as are external interrupts 0 and 1 (pins 2 and 3 respectively). SPI is available through the ICSP header on both the Mega2560 and Duemilanove / Diecimila. ''Please note that I'^2^'C is not located on the same pins on the Mega (20 and 21) as the Duemilanove / Diecimila (analog inputs 4 and 5).''
August 23, 2012, at 09:38 PM by Scott Fitzgerald - Page creation based on Uno
Added lines 1-142:
!!Arduino Due

(:table border=0 align=center:)

(:cellnr colspan=2:)[[Attach:ArduinoDue_Front.jpg | Attach:ArduinoDue_Front_450px.jpg ]]
(:cell colspan=2:)[[Attach:ArduinoDue_Back.jpg |Attach:ArduinoDue_Back_450px.jpg ]]
(:cellnr colspan=2:) ''Arduino Due Front''
(:cell colspan=2:) ''Arduino Due Back''

(:cell:) ''Arduino Due Front''
(:cell:) ''Arduino Due Back''

(:tableend:)

(:table border = 0 :)
(:cell:) [[http://store.arduino.cc/ww/index.php?main_page=product_info&cPath=11_12&products_id=195 | Attach:buttonStore.jpg ]]
(:cell:)[[http://arduino.cc/en/Main/Buy | Attach:buttonDistributors.jpg ]]
(:tableend:)

!!!Overview

The Arduino Due is a microcontroller board based on a 32 bit ARM architecture ([[http://www.atmel.com/dyn/resources/prod_documents/doc8161.pdf | datasheet]]). It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 12 analog inputs, a 84 MHz crystal oscillator, a micro USB connection, a power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or battery to get started.

//////////////
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter.\\
{+Revision 2+} of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier to put into [[/Hacking/DFUProgramming8U2 | DFU mode]].\\
{+Revision 3+} of the board has the following new features:
* 1.0 pinout: added SDA and SCL pins that are near to the AREF pin and two other new pins placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided from the board. In future, shields will be compatible both with the board that use the AVR, which operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a not connected pin, that is reserved for future purposes.
* Stronger RESET circuit.
* Atmega 16U2 replace the 8U2.

"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest in a series of USB Arduino boards, and the reference model for the Arduino platform; for a comparison with previous versions, see the [[Main/Boards | index of Arduino boards]].

!!!Summary

||border=0
||Microcontroller ||ATmega328 ||
||Operating Voltage ||5V ||
||Input Voltage (recommended) ||7-12V ||
||Input Voltage (limits) ||6-20V ||
||Digital I/O Pins ||14 (of which 6 provide PWM output) ||
||Analog Input Pins ||6 ||
||DC Current per I/O Pin ||40 mA ||
||DC Current for 3.3V Pin ||50 mA ||
||Flash Memory ||32 KB (ATmega328) of which 0.5 KB used by bootloader ||
||SRAM ||2 KB (ATmega328) ||
||EEPROM ||1 KB (ATmega328) ||
||Clock Speed ||16 MHz ||


!!!Schematic & Reference Design

EAGLE files: [[Attach:arduino_Uno_Rev3-02-TH.zip | arduino-uno-Rev3-reference-design.zip]] (NOTE: works with Eagle 6.0 and newer)

Schematic: [[Attach:Arduino_Uno_Rev3-schematic.pdf | arduino-uno-Rev3-schematic.pdf]]

'''Note:''' The Arduino reference design can use an Atmega8, 168, or 328, Current models use an ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is identical on all three processors.

!!!Power

The Arduino Uno can be powered via the USB connection or with an external power supply. The power source is selected automatically.

External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER connector.

The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may be unstable. 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.''' 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.

* '''3V3.''' A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.

* '''GND.''' Ground pins.

!!!Memory

The ATmega328 has 32 KB (with 0.5 KB used for the bootloader). It also has 2 KB of SRAM and 1 KB of EEPROM (which can be read and written with the [[http://www.arduino.cc/en/Reference/EEPROM | EEPROM library]]).

!!!Input and Output

Each of the 14 digital pins on the Uno can be used as an input or output, using [[Reference/PinMode | pinMode()]], [[Reference/DigitalWrite | digitalWrite()]], and [[Reference/DigitalRead | digitalRead()]] functions. They operate at 5 volts. Each pin can provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by default) of 20-50 kOhms. In addition, some pins have specialized functions:

* '''Serial: 0 (RX) and 1 (TX).''' Used to receive (RX) and transmit (TX) TTL serial data. These pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.

* '''External Interrupts: 2 and 3.''' These pins can be configured to trigger an interrupt on a low value, a rising or falling edge, or a change in value. See the [[Reference/AttachInterrupt | attachInterrupt()]] function for details.

* '''PWM: 3, 5, 6, 9, 10, and 11.''' Provide 8-bit PWM output with the [[Reference/AnalogWrite | analogWrite()]] function.

* '''SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).''' These pins support SPI communication using the [[Reference/SPI | SPI library]].

* '''LED: 13.''' There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it's off.

The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and the [[Reference/AnalogReference | analogReference]]() function. Additionally, some pins have specialized functionality:

* '''TWI: A4 or SDA pin and A5 or SCL pin.''' Support TWI communication using the [[Reference/Wire| Wire library]].

There are a couple of other pins on the board:

* '''AREF.''' Reference voltage for the analog inputs. Used with [[Reference/AnalogReference | analogReference]]().

* '''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.

See also the [[Hacking/PinMapping168 | mapping between Arduino pins and ATmega328 ports]]. The mapping for the Atmega8, 168, and 328 is identical.

!!!Communication

The Arduino Uno has a number of facilities for communicating with a computer, another Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the board channels this serial communication over USB and appears as a virtual com port to software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no external driver is needed. However, [[http://arduino.cc/en/Guide/Windows#toc4 |on Windows, a .inf file is required]]. The Arduino software includes a serial monitor which allows simple textual data to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1).

A [[http://www.arduino.cc/en/Reference/SoftwareSerial | SoftwareSerial library]] allows for serial communication on any of the Uno's digital pins.

The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus; see the [[Reference/Wire | documentation]] for details. For SPI communication, use the [[Reference/SPI | SPI library]].

!!!Programming

The Arduino Uno can be programmed with the Arduino software ([[Main/Software | download]]). Select "Arduino Uno from the '''Tools > Board''' menu (according to the microcontroller on your board). For details, see the [[Reference/HomePage | reference]] and [[Tutorial/HomePage | tutorials]].

The ATmega328 on the Arduino Uno comes preburned with a [[Tutorial/Bootloader | bootloader]] that allows you to upload new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol ([[http://www.atmel.com/dyn/resources/prod_documents/doc2525.pdf | reference]], [[http://www.atmel.com/dyn/resources/prod_documents/avr061.zip | C header files]]).

You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header; see [[Hacking/Programmer | these instructions]] for details.

The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available [[ | in the Arduino repository]]. The ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
* On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy) and then resetting the 8U2.
* On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground, making it easier to put into DFU mode.
You can then use [[http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886 | Atmel's FLIP software]] (Windows) or the [[http://dfu-programmer.sourceforge.net/ | DFU programmer]] (Mac OS X and Linux) to load a new firmware. Or you can use the ISP header with an external programmer (overwriting the DFU bootloader). See [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285962838 | this user-contributed tutorial]] for more information.

!!!Automatic (Software) Reset

Rather than requiring a physical press of the reset button before an upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software uses this capability to allow you to upload code by simply pressing the upload button in the Arduino environment. This means that the bootloader can have a shorter timeout, as the lowering of DTR can be well-coordinated with the start of the upload.

This setup has other implications. When the Uno is connected to either a computer running Mac OS X or Linux, it resets each time a connection is made to it from software (via USB). For the following half-second or so, the bootloader is running on the Uno. While it is programmed to ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first few bytes of data sent to the board after a connection is opened. If a sketch running on the board receives one-time configuration or other data when it first starts, make sure that the software with which it communicates waits a second after opening the connection and before sending this data.

The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see [[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1213719666/all | this forum thread]] for details.

!!!USB Overcurrent Protection

The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts and overcurrent. Although most computers provide their own internal protection, the fuse provides an extra layer of protection. 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.

!!!Physical Characteristics

The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the USB connector and power jack extending beyond the former dimension. Four screw holes allow the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.

Share