Port manipulation PINx commands with Arduino Due ?

Hello iana,

To manipulate individual pins in Arduino Due you have to use Graynomad pinout diagram...

http://forum.arduino.cc/index.php?topic=132130.0

...with the following code lines:

// Pin HIGH
REG_PIO[port]_SODR = 0x1 << [port Pin];

// Pin LOW
REG_PIO[port]_CODR = 0x1 << [port Pin];

For example, if you want to set HIGH pin 13, look at its port pin (clear yellow background) which is B.27. This indicates pin 27 of port B. Thus,

REG_PIOB_SODR = 0x1 << 27;

if you want to set LOW pin 36, its port pin is C.4. Thus,

REG_PIOC_CODR = 0x1 << 4;

if you want to set LOW pin A7, its port pin is A.2. Thus,

REG_PIOA_CODR = 0x1 << 2;

and so on....

p