Skip to content

After reset pin 13 is configured as an output #57

Open
@technoblogy

Description

@technoblogy

On the Uno R4 Minima and Uno R4 WiFi, pin 13 is made an output after reset, so if you do:

void setup() {
  Serial.begin(9600);
  delay(5000);
}

void loop () {
  Serial.println(digitalRead(13));
  delay(1000);
}

and apply 5V to the pin (via a resistor for safety), you still get 0.

The usual Arduino convention is that all digital pins are inputs after reset, and to make a pin an output you have to call pinMode(13, OUTPUT), for example. As far as I know no other Arduino board does this.

The way it is currently working is undesirable, because you might have pin 13 connected to a voltage input; an accidental reset could then cause excessive dissipation in the output driver.

Note: Originally posted on the Early Access Program forum, but still an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselftype: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions