I have a sketch that is quite long and involved on a stand alone Uno with no other devices attached. . I made a bunch of small changes and notice the on-board LED is on and stays on from the moment the program starts. No where in my code is pin 13 set to HIGH. What could be causing the on-board LED on the Uno? This has not happened before with this program or project.
Blackfin: No, no changes of state any place. Its a program that does some some math and comparing with arrays, but does not change any pin states: just gives the answer to the monitor screen
Still doesn’t address the ‘why’
Is it an oddball bootloader, or some other hardware anomaly... or is there a magic gremlin lurking that will cause issues for the OP later ?
lastchancename:
Still doesn’t address the ‘why’
Is it an oddball bootloader, or some other hardware anomaly… or is there a magic gremlin lurking that will cause issues for the OP later ?
Possibly floating input on the LM358 (if it’s an original).
"Pin 13 is an input for an op-amp. If there is a voltage on pin 13 the op-amp will match that voltage on its output which drives the LED. Because INPUT pins have high impedance, without a pull-down resistor their voltage will float, or perhaps there is a miniscule leakage from the micrcontroller and without a pull-down resistor there will be voltage on the pin. Op-amp inputs have a theoretical infinite impedance."
*"*It appears that the UNO r3 works differently from earlier versions. (This is a design improvement.) With the old version you couldn't use pin 13 as INPUT-PULLUP because the voltage would only be 1.7V because the LED was draining the current coming through the pull-up resistor. With the UNO R3 the op-amp won't drain the pull-up current allowing us to set pin 13 as INPUT_PULL-UP. The Pro-mini still has the old design however, and if you want to use pin 13 as INPUT-PULLUP you have to flick the resistor off the board."