Skip to content

Digital Pin Numbering off for D76-D83, D84-D85, and D93-D94 #7

Closed
@mjs513

Description

@mjs513

Using the Giga full pinout diagram and a test setup
Image

and sketch modified from a @KurtE sketch

int current_pin = 13;
int next_pin_number = 0;
#define DBGSerial Serial
void setup() {
    // Blink any pin.  Note: I put pin 13 as input to see if we can
  // jumper to it to see if we can find the pin...
  while (!Serial && millis() < 5000);
  DBGSerial.begin(115200);
  delay (250);
  DBGSerial.println("Find Pin by blinking");
  DBGSerial.println("Enter pin number to blink"); 
  pinMode(13, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if (DBGSerial.available()) {
    int ch;
    while ((ch = DBGSerial.read()) != -1) {
      if ((ch >='0') && (ch <= '9')) {
        next_pin_number = next_pin_number * 10 + (ch-'0');
      } else {
        if (next_pin_number != 0) {
          digitalWrite(current_pin, LOW); // turn the previous pin to low...
          current_pin = next_pin_number;
          pinMode(current_pin, OUTPUT);
          if (current_pin != 13)
            pinMode(13, INPUT);
          digitalWrite(current_pin, HIGH);
          next_pin_number = 0;  // setup to enter next pin
          Serial.print("Now Blinking pin:"); Serial.println(current_pin);
        }
      }
    }
  } else {
    digitalWrite(current_pin, !digitalRead(current_pin));
    delay(250);
  }  
}

D0-D60 ring out per the giga pinouts.

D76-D83 (A0 to A7) ring out to D78-D85 (off by 2)
D84-D85 ringout to D90 and D91
D93-D94 ringout to D92 and D93.

Think numbering is off somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions