NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Microcontroller Programming » Replacing the MCU - Initialising the bootloader

July 20, 2010
by pjack
pjack's Avatar


It took me a while to find out how to do this, despite all the good threads out there, none of them were able to sum it up like I would have liked, hence I write this thread. The hardware I used, I got from european suppliers, but they also ship worldwide.

The subject of acquiring a new Microcontroller (ATmega168 - 20PU) and replacing it with the one you received with your nerd kit, because you believe it to be broken will require a bit of work and cash.

You will need an ISP Programmer. I used this one mySmartUSB light for a price of 14.95€ which enabled me to burn the bootloader on the microcontroller directly via a usb connection. And evidently a new ATmega168-PU which you can get from most electronic suppliers online for about 6€

Here are the steps I followed.

  1. Install the driver for the mySmartUSB light.
  2. Make sure all power / ground connections are connected from the micro-controller to the power/ground rails on the breadboard. Then make sure all the connections between the ISP programmer and the appropriate pins on the chip and power/ground rails are connected.

This image may help...

alt image text

and so may this one...

alt image text

If in doubt look at this thread or the technical page of the ISP Programmer. Also, crystal and capacitor can stay in place. I should have taken a photo of the whole set up, but I guess you will see that on your own.

  1. From the ISP programmer web page under the section(graphical interface/firmware..). Download the SupportBox and change the configurations to make sure that power is on (5V) and that firmware is stk500
  2. Also Download the myAVR Progtool and browse for the foodloader.hex file located in the main Code file under bootloader168 for writing flash.
  3. Make sure all configurations in the Progtool are set correctly... programmer (mySmartUSB light) and controller (ATmega168) should be configured.
  4. MAKE ABSOLUTELY SURE, that all the fuses are set correctly to burn, check the document fuses_mike in Code/bootloader168
  5. If all is certain. Burn.

After that.. you are back in the world of nerdkits. I hope this thread will be of use to some people. It would have been for me. Good luck!

Post a Reply

Please log in to post a reply.

Did you know that our customers love us? Learn more...