11
\$\begingroup\$

Pin 13 has a surface mounted LED on it. Aside from the fact that it makes something light up, is there any non-negligible difference between this pin and a general digital pin?

For example, if I analogWrite() on pins 12 and 13, will the output on 13 be significantly less?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Remember that analogWrite() gives you a duty cycle not a voltage. There is no 'less'. Also, apart from the Due, most Arduinos do not support analogWrite() on pins 12 or 13. \$\endgroup\$
    – Octopus
    Commented Apr 9, 2013 at 20:14

2 Answers 2

16
\$\begingroup\$

From Arduino.cc

NOTE: Digital pin 13 is harder to use as a digital input than the other digital pins because it has an LED and resistor attached to it that's soldered to the board on most boards. If you enable its internal 20k pull-up resistor, it will hang at around 1.7 V instead of the expected 5V because the onboard LED and series resistor pull the voltage level down, meaning it always returns LOW. If you must use pin 13 as a digital input, use an external pull down resistor.

\$\endgroup\$
2
\$\begingroup\$

The simple series resistor and LED was changed on the Uno R3 board. Now Pin13 is connected to an op-amp which turns on the LED. This significantly reduces the load on the pin and reduces the effects on previous boards.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.