Many AVRs have the capability to be ISP'd - or in system programmed over SPI. I have a project where the entire device can get firmware updates, and I'd like to also update the firmware on it's front panel from the main micro. Since the front panel is conveniently connected through SPI, I've had the idea of just re-programming it from my main MCU over SPI.

That's the ISP method, which would be quite easy and would not require me to write a boot loader. If I can't do the ISP, then of course I will be needing a bootloader.

So basically - can another MCU re-program the ATMEGA644 over the SPI bus?


1 Answer 1


Yes, very easily. In this scenario, RESET works as the active-low slave-select. The programming algorithm is very well documented in every AVR datasheet (look under Memory programming, Serial Downloading).

Note however that some AVR chips have their ICSP SPIs on different pins than their regular SPIs (for example, atmega128 shares the ICSP SPI with one of its USARTs).

  • \$\begingroup\$ Thanks for the answer - Once I get off my lazy butt and design myself a PCB, I'll try this out and try to write some code to do exactly this. Is there any other little gotchas to take care of when doing this, like you needing to use 12 V to program like you do on some other MCUs? \$\endgroup\$
    – Tristan
    Oct 7, 2011 at 4:52
  • \$\begingroup\$ @TristanSeifert, no gotchas, it's pretty much straightforward. Take a look at technika.junior.cz/trac/browser/shupito/shupito/fw_common/… if you want some inspiration. :) Goot luck! \$\endgroup\$
    – avakar
    Oct 7, 2011 at 5:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.