Indication for bootloaded ATMEGA328PU

Hi,

Is there any indication i can get to see if chip is bootloaded or not ? I am using Arduino UNO.

Some indication like LED blink after inserting the chip on UNO board and connecting battery without PC interface ?

Thanks,

Ujjwal Soni

Yes, usually the L LED will blink with some pattern.
If Optiboot is loaded, the blink is 3 quick flashes, then a longer pause, and repeats.

Once you load a sketch, the L LED will do whatever your code is programmed for, and you will not see the L LED flashing from the bootloader.

Hi,

Is this the LED that is connected on pin 13 ?

Thanks,

Ujjwal Soni

Yes.

I have a follow up question regarding the bootloader (optiboot) on the UNO.

When I have a sketch loaded, the bootloader still appears to run when I powerup the UNO using the b attery/external power connector (no USB).

Is that supposed to happen? Or better yet, how is that supposed to happen?
The optiboot source code indicates that the appStart() function is called directly in any reset case except for an external reset (EXTRF). I understand that after the watchdog timeout, the watchdog reset will result in the bootloader being called again. But, this time the WDRF flag would be set rather than the EXTRF and optiboot would call appStart() right away.

Why is it that on power up, optiboot still flashes the LED as if the bootloader has run, then sketch starts as expected?

I would expect (based on the optiboot source code) that on power-on reset, the bootloader would call appStart() right away and not flash the LED 3 times.

Is there something special about the UNO board that when the board powers up it causes an "external reset" instead of a power-on reset?

TheGipp

Don't know.