default pinmode of pin 13

The official documentation for digital pins says "pins default to inputs, so they don't need to be explicitly declared as inputs with pinMode() when you're using them as inputs."

That suggests that all digital pins default to inputs.

But the documentation then muddies the water by saying that "If you must use pin 13 as a digital input, set its pinMode() to INPUT and use an external pull down resistor."

That implies that pin 13 does not default to input.

My tests with a Nano v3.0 and IDE 1.6.5r-5 indicate that pin 13 defaults to OUTPUT (LOW), not to INPUT:

I've found nothing on Google that mentions this. Comments?

The bootloader probably does not reset it to INPUT after using it for those three quick flashes. Might be different for other boards.

Thanks. Yes, that appears to be the case.

Pro Mini behaves the same way.

Another issue - that pin is connected to an LED.

On the Uno and Mega, the pin is buffered with an opamp, but on the Nano/Pro Mini and probably some Uno clones, this is not done, so you have to take account of the fact that there's always an LED loading that pin.

Optiboot handles the LED correctly - so if you bootload them as Uno's that should improve things, but there's still the electrical issue mentioned above.

DrAzzy:
On the Uno and Mega, the pin is buffered with an opamp, but on the Nano/Pro Mini and probably some Uno clones, this is not done, so you have to take account of the fact that there's always an LED loading that pin.

Thanks - didn't know that the Uno LED pin is buffered with an op amp (never have owned an Uno - started with an Arduweeny, and subsequently have always used breadboarded 328s, Nanos, or Pro Minis).

DrAzzy:
Optiboot handles the LED correctly - so if you bootload them as Uno's that should improve things, but there's still the electrical issue mentioned above.

Hmmm. That's interesting! I always thought all "Arduinos" with 328s used the same bootloader.

I always thought all "Arduinos" with 328s used the same bootloader.

There are at least three out there.
There is the original Duemilanove bootloader ("atmegaboot") - 2k long; I think this is used on most Nanos.
There is the adafruit/sparkfun "modified atmegaboot" which has some bugfixes and minor feature additions. Still 2k, and probably present on at least the sparkfun "pro mini" boards.
And there is Optiboot, which shipped on the Uno, and CAN be installed on earlier boards (duemilanove, nano, mini, even on ATmega8-based systems.) It's only 512 bytes, and incorporates the adafruit/sparkfun fixes as well (in a somewhat different way.)
If you buy mini or nano clones, I'm not sure what bootloader you end up with. This is one of the reasons that Optiboot now includes a "version number" in the binary. Optiboot flashes the LED at the start of bootloading (it makes pin13 an output), but it returns it to the default "input" state before starting the sketch.

Sorry - been out. Thank you for the information. Amazing that there's that much difference in size of the bootloader.