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.

Support Forum » Viva NerdKits

April 09, 2009
by jhalbrecht
jhalbrecht's Avatar

I'm looking at the 0 posts and just gota, well wana, see if I can be the first to post other than the site nerds!

Interesting question if you want to reply in what you feel may be a more appropriate forum...

Why does the micro controller need a 'bootloader' ? What's the difference between the programmer you supply and other programmers like from Atmel?

Thanks for the Nerdkit I've really enjoyed it.

  • ja
April 09, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar

You got the first post on this sub-forum, anyway! :-)

The advantage of having a bootloader is that you can program the chip's flash memory directly over a serial connection. As you mention, there are native ways of putting code onto the chip, like the ISP "In System Programmer" protocol that the Atmel programmers like the AVRISP mkII use. However, by having a bootloader, we're able to use one piece of hardware (the serial connection) for both programming the chip and for communicating with the running program. In exchange, we sacrifice the last 2KB of the 16KB of flash memory for the bootloader itself.

So ultimately, we made an engineering tradeoff to stick with one piece of hardware in the kit, versus having to also include the $35 ISP programmer as well.

If you decide that you want more ATmega168-20PU chips (i.e. for more projects at once), you can either:

  1. Buy them from our store page, where we have pre-programmed ones for you, or
  2. Get an ISP programmer like the AVRISP mkII for $34 right now from Mouser, or
  3. If you have a PC with a parallel port, there is a "hack" we can describe that can program your new chips.

Hope that helps!


April 09, 2009
by Kevin
Kevin's Avatar

Is the bootloader on the nerdkit chip the same as any other chip bootloader or is it unique to the nerdkits?

Also, if you use an ISP or the parallel port hack does that mean you do not need the bootloader or is that a way to get the bootloader onto the chip?

I will want to flash the chip again and again if I make a change to my program. With the addition of a DB9 connector and a handful of other parts added to my end product I can flash all day long or a year from now if I modify the code. If I understand correctly I would be required to remove the chip from the circuit and place it in the ISP to update the code if I had a non-bootloader chip. So I want to stick with the bootloaded chips.

Do I understand correctly?

April 09, 2009
by MacGyver
MacGyver's Avatar

While I obviously don't know the complexity of flashing the chip using parallel or the ISP, but since we could get a pointer to the memory on one chip, is there a reason we couldn't program our first chip to flash a second chip completely overwriting the entire 16kb, which would give us a duplicate bootloader and memory? then we could use serial line to replace the 14kb of program memory?

April 11, 2009
by mrobbins
(NerdKits Staff)

mrobbins's Avatar


The bootloader is foodloader. To the "outside world" it follows the avr109 protocol so other bootloaders would be functionally equivalent. The code and compiled hex are included with your kit.

If you use an ISP (or parport) programmer, you can use that to:

  1. put the bootloader on the chip, and/or
  2. put your program directly on the chip (with or without the bootloader)

Even with a non-bootloader chip, you can still reprogram your chip "in system" using an ISP programmer -- no need to remove the chip. In fact, ISP stands for In-System Programmer. This basically relies on you not using the ISP pins for anything else in your project (or at least nothing that will interfere with the programming), but using the serial bootloader also requires that you don't interfere with the serial port pins. Still, using the bootloader is a common choice because you can use the same external hardware (i.e. a USB-Serial converter) for both talking to your application and for programming. Let me know if that make sense!


April 12, 2009
by Kevin
Kevin's Avatar

makes sense -

Thanks Mike!

Post a Reply

Please log in to post a reply.

Did you know that one NerdKits customer discovered that his hamster ran several miles in a night using his kit and a Hall-effect sensor? Learn more...