Uploading to What? How to clear?

Its clear from the IDE that a program is uploaded to the Uno. But into what type of memory does that program gob - Flash, SRAM, EEPROM?

I ask because after the board is powered down and back up again the program last uploaded still executes. This is also true if you use the reset button. Is there a way to clear the program memory - using an IDE command, perhaps?

void setup(){}
void loop (){}

-Fletcher

Is there a way to clear the program memory

Why would you want to do that? The simplest way is to load in a blank sketch like shown above.

But into what type of memory does that program gob

It goes into Flash and also runs out of Flash.

louarnold: Is there a way to clear the program memory

Depends what you mean by 'clear'. A brand new out-of-the-box Arduino usually isn't clear - it comes preloaded with a bootloader and a small ketch that just blinks the LED. It might be possible to erase either the bootloader or the sketch, but it wouldn't be easy since the IDE is designed to upload a compiled sketch. In any case I can't imagine any situatin where that would be useful.

If you just want to stop your Arduino doing 'stuff', upload Fletcher Chr's sketch that does nothing.

PeterH:

louarnold: Is there a way to clear the program memory

Depends what you mean by 'clear'. A brand new out-of-the-box Arduino usually isn't clear - it comes preloaded with a bootloader and a small ketch that just blinks the LED. It might be possible to erase either the bootloader or the sketch, but it wouldn't be easy since the IDE is designed to upload a compiled sketch. In any case I can't imagine any situatin where that would be useful.

If you just want to stop your Arduino doing 'stuff', upload Fletcher Chr's sketch that does nothing.

Hahaha, yes you are right. In a past IDE, I was able to clear the memory with NOPs using a single command, but that micro didn't have a bootloader; it used an ISP.

Thank you all. You told me what I needed to know.