Go Down

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

subramaniam

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
  delay(1000);
  REG_PORT_OUTCLR0 = PORT_PA17;     // Switch the output to 0 or LOW
  delay(1000);
}

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!


MartinL

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

or

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

Go Up