Folks, I have been playing a bit with Atmega328 and ATtiny processors, but in trying to understand them, it would help a lot if I can get the answer to a really basic question : When a brand new, unprogrammed AVR processor is powered on for the first time, what does it do?
Computers I have worked with in the past, when powered on, did basically one thing : they started executing instructions, starting at memory location zero.
Now the reason why I ask about the AVR :
I bought a Teensy2 - an Arduino lookalike based on the Atmega32U4, with a USB connector and a boot loader on the chip. I wrote a little assembler program on it using Atmel's Studio-7 IDE, but when I was going to compile it, it asked if I wanted it to start at address zero. There wasn't an option to say where else I might want it, so I said No, in case it overwrote the boot loader, which I imagined at that time, must be at location 0x0000. Seemingly, it did overwrite it anyway, because although my program ran when the chip was powered on, it had lost the ability to communicate with my PC. I contacted the people responsible for the Teeny, but it turned out mine was a clone, and not supported by them. However, they mentioned that on their product, all user programs run from address zero, and the boot loader is at the top of memory - so does the AVR core store the place to start from when powered up, in non-volatile memory - probably fuse-protected?
Computers I have worked with in the past, when powered on, did basically one thing : they started executing instructions, starting at memory location zero.
Now the reason why I ask about the AVR :
I bought a Teensy2 - an Arduino lookalike based on the Atmega32U4, with a USB connector and a boot loader on the chip. I wrote a little assembler program on it using Atmel's Studio-7 IDE, but when I was going to compile it, it asked if I wanted it to start at address zero. There wasn't an option to say where else I might want it, so I said No, in case it overwrote the boot loader, which I imagined at that time, must be at location 0x0000. Seemingly, it did overwrite it anyway, because although my program ran when the chip was powered on, it had lost the ability to communicate with my PC. I contacted the people responsible for the Teeny, but it turned out mine was a clone, and not supported by them. However, they mentioned that on their product, all user programs run from address zero, and the boot loader is at the top of memory - so does the AVR core store the place to start from when powered up, in non-volatile memory - probably fuse-protected?