Go Down

Topic: 168 Bootloader Error (Read 3 times) previous topic - next topic


So after all the trouble I had getting a parallel programmer to put a bootloader onto a 168, I went out and bought the AVRISP MKII. I'm using AVRStudio 4 and the 168 hex file. It gets through the loading portion, but when it tries to verify, it returns an error. I tried getting AVRdude to work on a mac, but I'm unix incompetent. Has anyone had any success getting AVRstudio to successful program the ATMEG168 with the bootloader?


I have a similar problem with the AVRISP MKII. I tried burning a bootloader for the atmega8 (and i believe i do have the right hex file) with avrstudio 4. I have inserted the chip into an Arduino NG, powered via USB.

I found that when I try to burn it onto a *new* (never used) Atmega8-16PU, burning fails (AVRSTudio says: "PROGRAMMING FLASH....FAILED / A problem occured when executing the command").
But when I try to burn on the Atmega8-16PU which came with the Arduino, it works nicely.
I presume it might have to do with the fuses & lock bits settings. These are different in both of the chips, but I get the sme error message when I try to set the new chip to the values read from the arduino chip.

Can anyone help me out? I can't find any more hints anywhere. Are there more subtyped to the atmega8-16pu? or what?


Well I got a bootloader on my 168 ok. From using AVRDude, I think you have to unlock the bootloader segment, erase the chip and set the fuses before you can burn the new bootloader. Then you have to relock the bootloader segement The process is covered here for the 168 using avrdude:
I'm not sure if AVRstudio will do all that for you when you try to burn a new hex file, but I doubt it. I don't even know what the fuse setting would need to be for the 16, but I think once you find them, you should be set.


Well I've uncovered an interesting problem. I want to use a 20MHz external clock with my 168 on a breadboard, but in the process of burning the new bootloader, I had to set the fuses to expect a 16Mhz clock. Can I change the clock fuse to 20MHz and still use the board to program my chip? Does anyone know which fuses to use? Thanks!



there's a handy online calculator for AVR fuse settings here:


Go Up