alparent:
westfw:
Sketches should work if programmed via ISP, as long as you have the fuses set NOT to start in the bootloader section.
Sorry.....but I'm lost
1st - westfw, again thank you for clearing up some things man. I truly appreciate your knowledge.
2nd - on to help this guy out.
When dealing with avr microcontrollers you have what are called switches that are just codes that do certain things to the chip to either help it operate in certain ways, lock people from trying to reflash the chip or to try to pull code from the chip, or make it skip things, and etc.
There are 3 types of switches - high, low, and e-lock fuses.
Per each chip model, they differ both in what switches the chip comes with, and what address each switch is located (in software. you'll see in this example)
So say you want to make an Atmega8 use an external oscillator/crystal of 8 to 12mhz, you would set that fuse by writing the binary address -
0xF8
These switches are also referred to as lock bits
You can find a calculator to set them what you want them to be here:
http://frank.circleofcurrent.com/fusecalc/fusecalc.php
BE CAREFUL WHEN USING THIS! If you don't know what you want to use or don't understand certain sections that you chose for your chip, consult with us in the forums to ensure the settings are proper. One error can efficiently lock you out of the chip (which you could only unlock with an HVP (High Voltage Programmer) which are easy enough to make, but it'll cost you some cash in making one, and set you back a little while waiting on the parts to get to you unless you have them laying around.
Now on to bootloaders and etc.
Bootloaders are basically applications that can reside in a section of the chip you can "lock" into place (in the very beginning of the chip memory). You have to essentially "unlock" that portion of the chip first before you can burn the bootloader into place, and then you have to "lock" that bootloader into memory because if you do not, then when you try to upload a sketch to the chip, it will erase the bootloader *if you need that extra memory that a bootloader would take up, you could just unlock it, and just not re-lock the bootloader section so you could have more application space available to upload to the chip.
What does a bootloader do? Essentially they can be used for a number of reasons, but one of the more prominent reasons are to run a predefined set of instructions on boot to set the system up to help do a defined task. It could be to test the components it runs to ensure there are no errors, or even to expand the functionality of a chip.
Think of it like the bios of a computer. Basically same difference.
Computer
1/Turn on power
2/Bios run (start bootloader)
3/Bios test (ensure no big errors are going on with internal hardware)
4/provide user interface for changing hard drive on the fly or going into bios settings
5/point to the hard drive set as the master 1st boot drive as defined in settings
6/point to run the boot program on 1st boot drive at the start of the boot partition.
Atmega Chip
1/Turn on power
2/Is fuse selected to run bootloader first?
3a/If above bootloader fuse = no, then skip bootloader and run sketch (or hex file)
3b/If above bootloader fuse = yes, then run bootloader
4/do defined instructions in bootloader
5/point to start of unprotected (non-bootloader) memory
6/run sketch(or hex file.)