Why the board runs before I upload any sketch?

I bought the latest Arduino-Uno board last week, read all the related information from the web and some from the book/magazine. I then downloaded the IDE 1.0.5 from Arduino and installed it in my Windows XP PC. Everything is is a smooth ride and I have a relatively good idea where I am and where I should go to.

However I have one question (actually more than one, but I post the others later as they do not belong to the same topic). I notice that the yellow LED blinks in 1 second frequency as soon as I power the board (by USB connection) even before I have uploaded any sketch. Is this normal? Yes, I do mean the the yellow LED, not the power LED (which is green) and not the Tx and Rx LEDs (which I know their purposes),

Any feedback are appreciated.

==YK==

it's just the sketch that was on it either by manufacturer or 3rd party.

(normally it's just the blink program which comes with it)

Thanks CJ.

So there is a sketch already existing in the flash memory of the ATmega328!

Ok, that is fine. I have no problem with that.

But if I upload my newly made sketch onto the card, will I run into any conflict? Or will the new sketch always supersede the old one?

Sorry for being a bit inquisitive. I just want to have a clear concept of the whole system as I am relatively new in this subject (but at the same time very much interested in it).

==YK==

A new sketch will always overwrite the old one. You can only have one sketch at a time.

Hi, I've been playing with my UNO for a couple of months now. And the LED on pin 13 still blinks a few times when I power it up and then remains on, even though I have re-programmed it many times, does this mean pin 13 is aways HIGH, suppose I should test it, but I think the LED is driven by an op-amp or inverter??

Hope it helps? Regards

Mel.

but I think the LED is driven be a op-amp or inverter

No, look at the schematics, straight from the processor pin.

And the LED on pin 13 still blinks a few times I power it up and then remains on,

r That is the action of the boot loader looking to see if a sketch is going to up uploaded. If it is not then it will either stay as an output high or will be put back to being an input depending on the version of your boot loader.

even though I have re-programmed it many time,

It will stay how the boot loader left it unless you change it in your current sketch.

If your Uno is a rev3 version (present one being sold) the pin 13 led is driven with a section of the on board op-amp and some have reported their rev3 board keeps pin 13 led on even after the bootloader has changed the pin 13 state to be an input pin before jumping to the user's flash sketch code. This is a result of the op-amp input being 'floating' in that state so it's output is undefined. As long as you can control pin 13 in your sketch, such as changing it to an output and LOW state, which will keep the led off, if you are not using it in your sketch.

Lefty

Yes, mine has the same response as Cactusface's. I guess ours are normal then.

Just want to add in what I have observed.

If I upload a sketch that has no command related to output port 13, the yellow SMT LED will light up as usual during "steady state". If my sketch does have instructions affecting outport port 13, the LED will still work according to the sketch I uploaded.

If you don't address pin 13 in the sketch probably the op-amp input will be floating and the on-board LED will probably turn on.

[quote author=Nick Gammon link=topic=192565.msg1427814#msg1427814 date=1381730977] If you don't address pin 13 in the sketch probably the op-amp input will be floating and the on-board LED will probably turn on. [/quote]

Or maybe probably turn off. It's really a board specific thing in that the specific op-amp input offset for a specific board will most likely be consistent with a floating input, but not specific to always being a HIGH or LOW 'default' output.

Lefty