Go Down

Topic: Port Numbers for Arduino Zero (Read 767 times) previous topic - next topic


Hello, I have an Arduino Zero and am looking for faster DigitalWrite functions. I came across this code for the blink program:

 void setup() {
  // put your setup code here, to run once:
  REG_PORT_DIRSET0 = PORT_PA17;   // Set the direction of the port pin PA17 to an output

void loop() {
  // put your main code here, to run repeatedly:
  REG_PORT_OUTSET0 = PORT_PA17;     // Switch the output to 1 or HIGH
  REG_PORT_OUTCLR0 = PORT_PA17;     // Switch the output to 0 or LOW

Here, I think pin 13 corresponds to PORT_PA17; Similarly, I am trying to find the port numbers for all the other pins. Could someone please provide a list of the same? Thanks!



There's a list on reply #34 on this thread: https://forum.arduino.cc/index.php?topic=334073.30


use the Atmel schematic in reply #1 on this thread: https://forum.arduino.cc/index.php?topic=472989.0

Go Up