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 pinMode(), digitalWrite(), and 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.
PWM: Pins 2 to 13
Provide 8-bit PWM output with the analogWrite() function. the resolution of the PWM can be changed with the analogWriteResolution() function.
SPI: SPI header (ICSP header on other Arduino boards)
These pins support SPI communication using the SPI library. The SPI pins are broken out on the central 6-pin header, which is physically compatible with the Uno, Leonardo and Mega2560. The SPI header can be used only to communicate with other SPI devices, not for programming the SAM3X with the In-Circuit-Serial-Programming technique. The SPI of the Due has also advanced features that can be used with the Extended SPI methods for Due.
CAN: CANRX and CANTX
These pins support the CAN communication protocol but are not not yet supported by Arduino APIs.
“L” LED: 13
There is a built-in LED connected to digital pin 13. When the pin is HIGH, the LED is on, when the pin is LOW, it’s off. It is also possible to dim the LED because the digital pin 13 is also a PWM outuput.
TWI 1: 20 (SDA) and 21 (SCL)
TWI 2: SDA1 and SCL1.
Support TWI communication using the Wire library.
Analog Inputs: pins from A0 to A11
The Due has 12 analog inputs, each of which can provide 12 bits of resolution (i.e. 4096 different values). By default, the resolution of the readings is set at 10 bits, for compatibility with other Arduino boards. It is possible to change the resolution of the ADC with analogReadResolution(). The Due’s analog inputs pins measure from ground to a maximum value of 3.3V. Applying more then 3.3V on the Due’s pins will damage the SAM3X chip. The analogReference() function is ignored on the Due.
The AREF pin is connected to the SAM3X analog reference pin through a resistor bridge. To use the AREF pin, 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 analogWrite() function. These pins can be used to create an audio output using the Audio library.
Other pins on the board:
Reference voltage for the analog inputs. Used with analogReference().
Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board.