SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By peroja
#108771
hello all,

i just burned the bootloader onto a spare atmega328p with arduino duemillanove acting as ISP

i did it this way and it worked perfect:

Image

now i have an atmega128 on a little board with an 16MHz crystal

Image

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. :D

thank you
randy
By stevech
#108849
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
http://www.avrfreaks.net/index.php?modu ... tem_id=625
which also has the PC side GUI based app.

again, there are many.
By n1ist
#108935
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
By tecoist
#108938
n1ist wrote: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.
By n1ist
#108981
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...
/mike