now i wonder if it is possible to burn the arduino bootloader onto it based on the way i did with the atmega328? and then using the arduino UI to prgramm it? do you think that is possible? that would be incredible awesome.
You need a bootloader that is coded/designed to target the larger memory of the mega128 and differences in register addresses.
There’s probably one out there for Arduino.
Bootloaders for mega128 for Atmel standard bootloading of .hex files produced by a variety of compilers can be found on the avrfreaks.net forum, projects section, such as
n1ist:
One other gotcha - the 128 uses different pins for programming instead of the regular MISO/MOSI/SCK. Instead it uses RXD0, TXD0, and SCK.
/mike
Are you sure about that? I’ve never used this particular part, but the data sheet shows the usual SPI (+ spi-programming-enable) ISP interface we all know and love from the other Atmel parts. If you can pull PEN# low during reset, it should SPI-program.
Check out section 26.8, “SPI Serial Programming Pin Mapping” of the data sheet. I think the programming algorithm is the same. There’s a bunch of ATMegas that program over this different set of pins; it may be the ATMega103 derivatives…