Hello!
is there a way to clear out all the programs that I have loaded onto my atmega168? Let me explain the situation. I loaded up some code onto the chip using my AVRISP mkII programmer. Everything was working fine and I was happy

Then, I modified the code a bit, compiled and reloaded the hex file onto the chip. It did not work right and I was sad

So, I modified the code back to the way I originally had it, compiled and reloaded the hex file onto the chip. However to my surprise

the original code did not work correctly the second time it was loaded onto the microcontroller. This makes me mad

So I am wondering if there is a way to clear out the internal flash memory of the chip so I can start back from scratch??? Any help would be greatly appreciated