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 » Quick bootloader question

October 09, 2010
by bingohighway
bingohighway's Avatar

Hi chaps,

Loving the kit, I'm getting loads out of it. I'm now contemplating attempting to load your bootloader onto a blank chip. I've done a bit of reading and so far I just need a quick confirmation that I am understanding it all correctly :-)

So, to break down the process that I would need to follow, I think it would go as follows:

1) Get an ISP e.g. AVRISP MKII.

2) Build the relevant circuit to interact with the above kit.

3) Upload your bootloader to the chip.

4) Use the chip as per described in the Nerdkit manual e.g. build the basic circuit to upload the user progs and power ahead!

I think they are the stages you'd need to follow, but I'm a bit unsure.<br />

Any comments/corrections?



October 10, 2010
by Rick_S
Rick_S's Avatar

Your steps are real close, the only additional steps would be to modify the makefile for the type of programmer you are using, and upload new fuse/lock bit settings to the chip. Those would go between your steps 2 & 3.

As for a relevant circuit, you can use the NK base setup only replace the jumper wire that connects pin1 to the 5v rail with a 10k resistor. This will allow the programmer (which has a wire that goes to pin1 (reset)) to toggle the reset line. The other connections to the microcontroller will be on pins 17 (MOSI), 18 (MISO), 19 (SCK), and VCC (5V) and GND.

One last thing, depending on if you use an atmega168 or atmega328, there are different fuse settings and bootloader files. Make sure to use the right one or avrdude will give you errors...


October 10, 2010
by bingohighway
bingohighway's Avatar

Ahh brill, thanks Rick, much appreciated! :-)

I've just looked at the AVRISP manual and I can see how that lines up.

FYI to anyone reading this post, the manual is here, page 26 for ISP pin outs.

November 10, 2010
by bingohighway
bingohighway's Avatar

Finally got it to work.... the main learning point I got from doing this myself if that I found it wouldn't work without external power e.g. I had to power the usual rails via the voltage regulator and the gnd/vcc pins from the AVRISP didn't actuallysupply the power. (well, I don't know how correct that actually is, but it didn't work otherwise!)

Post a Reply

Please log in to post a reply.

Did you know that two resistors plus a transistor can be used to make a better voltage supply? Learn more...