Pages: [1]   Go Down
Author Topic: Pin 13 and internal pull up.  (Read 541 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did not see anywhere on the arduino docs anything about the built in pin 13 LED on arduino boards pulling down the internal pull up resistor. but i did not look at every single page.

I think what happens if you have a normally closed to ground switch relying on the pullup resistor it will not work because the LED is pulling the pin down more than the internal 20k pulls it up.

maybe it should be noted on the digital pins page.

Logged

Spokane, Washington
Offline Offline
God Member
*****
Karma: 0
Posts: 686
My name is Bob, and I'm an addict.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm confused on what you're trying to explain?

Your button won't work on 13?
Do keep in mind, the internal pull-ups won't turn on unless specified as HIGH and as an INPUT, other wise, it'll just output the 5v.. and hooking up a ground when it's set to high and NOT set as an input, could result in damaging the Arduino.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 331
Posts: 16518
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I think what happens if you have a normally closed to ground switch relying on the pullup resistor it will not work because the LED is pulling the pin down more than the internal 20k pulls it up.


That is probably correct. What is happening is that the LED and series resistor and internal pull-up resistor (if pin is set to input and high is outputted to set pull-up) are acting like a voltage divider. You could measure the voltage at the pin to see what it is, but it's bound to not be a legal logic voltage level. It's pretty problematic to utilize pin 13 as a input to a switch without risking some kind of damage in certain situations.

Lefty
Logged

0
Offline Offline
Sr. Member
****
Karma: 3
Posts: 325
KC4MM
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You are correct. Pin 13 connects to a 1k resistor in series to a LED to Ground.

It works fine as an output pin but if you need to use it as an input you will need to drive it with something that will drive it 'hard' to a logic high such as a TTL output. Or you can do what I do and flick the resistor off the board with the tip of a soldering iron disconnecting the LED from the output making it into an 'ordinary' digital pin.

« Last Edit: September 02, 2009, 05:01:29 am by RoyK » Logged

Pages: [1]   Go Up
Jump to: