AVR_ISP_Programmer

Architecture unaware library that tries to program AVR devices by ISP.

AVR_ISP_Programmer

🥳 Recently updatedC

Architecture unaware library that tries to program AVR devices by ISP.

AVR ISP Programmer

Bit-bang AVR ISP from any microcontroller with enough pins. The library is plain C and architecture-agnostic: you implement reset, SCK, MOSI, MISO and a microsecond delay, and it handles the rest. Written for the ATmega48 because I needed it to fit in almost nothing. Also proven on the ESP32-S2.

What you get

  • One C header. The whole ISP protocol, bit-banged.
  • Eight IO functions to implement: reset, SCK, MOSI, MISO, delay.
  • Chip erase, flash, EEPROM, fuses.
  • Tested on ATmega48 and ESP32-S2.

Bringing up a target

Pulse reset. Send `0xAC 0x53`. Check the echo. That is how the library enters serial programming mode - fail the echo and nothing runs. Every SPI byte is clocked MSB first through your IO layer. From there you can erase the chip, load flash pages, write EEPROM, and set fuses and lock bits. Ready/busy polling paces the writes to the target.