Is my pin 13 toast?

For makers who have purchased an Adafruit Starter Pack, get help with the tutorials here!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jskora
 
Posts: 23
Joined: Wed Jan 28, 2009 9:23 pm

Is my pin 13 toast?

Post by jskora »

If I setup pin 13 as input with the pull up resistor, I am only seeing ~1.75v on the pin and it returns LOW from a digitalRead() unless connected to 5v. Pin 12 on the other hand, as I expected, reads HIGH until connected to ground. Have I toasted something on the Arduino? (I am using a Duemalinove)

The code is

Code: Select all

int pinIn = 13;
void setup() {
  pinMode(pinIn, INPUT);
  digitalWrite(pinIn, HIGH);
}
...

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: Is my pin 13 toast?

Post by westfw »

Pin 13 has the LED on it that will interfere with high-level signals unless the impedance of your source (eg value of your pullup resistor) is significantly lower that the resistor used for the LED. It'll work better if you use a pull-DOWN resistor and have your switch connect to +5V...

User avatar
jskora
 
Posts: 23
Joined: Wed Jan 28, 2009 9:23 pm

Re: Is my pin 13 toast?

Post by jskora »

Thanks. That makes sense but wasn't from either the digital pins page or the Duemilanove hardware page.

User avatar
westfw
 
Posts: 2008
Joined: Fri Apr 27, 2007 1:01 pm

Re: Is my pin 13 toast?

Post by westfw »

Yeah; there's sort of an assumption that since pin13 has the LED, it'll be one of the last choices to use for any functions other than blinking that LED. It doesn't seem unreasonable...

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Starter Pack”