Summary of Programming an ATMega128
The article details challenges faced when programming ATMega128 chips on breakout boards using the Arduino IDE and USBTiny/USBASP programmers. Despite getting close with Arduino 022 and USBTiny, uploading code failed due to configuration issues. Switching to Oshonsoft AVR Simulator successfully compiled a small hex file, but Windows 8.1 driver signature enforcement complicated USBASP programmer installation. Eventually, with disabled driver enforcement and careful wiring, the author used AVRDudess, a GUI for avrdude, to program the chip successfully.
Parts used in the ATMega128 Programming Project:
- ATMega128 chip
- Custom breakout board
- Arduino IDE (version 022)
- USBTiny programmer
- Oshonsoft AVR Simulator software
- USBASP programmer
- AVRDudess (GUI for avrdude)
- Laptop running Windows 8.1
- avr-gcc compiler
- avr-dude programming tool
We tried all kinds of ways to get the Arduino IDE to compile and program our ATMega128 chips that we’d so carefully soldered onto our breakout boards. Steve spent longer than could be reasonably expected, hammering away, determined to make progress. In fact, he got so far as to get Arduino 022 to compile some code for the ATMega – it just wouldn’t upload via the USBTiny programmer
While Steve refused to give up, I went down a slightly different route. Having recently discovered that the latest Oshonsoft AVR Simulator included support for both the ATMega128 and ATMega165, I threw together a simple blink test and compiled to a .hex file (which the compiler did a great job of creating, at a meagre 240 bytes in size!)