hi all I have a few atmega16's lying around and was wanting to use these chips withe the arduino boot loader and i found this thread which was very helpful http://forum.arduino.cc/index.php?topic=172881.msg1283986#msg1283986
a guy called "hiduino" did attach a mega16 boot-loader but i want to compile the bl myself and need a little help in what changes need to be made in optiboot.c and makefile and pin_defs.h to get it to compile
so far i have added this to the make file
atmega16: TARGET = atmega16 atmega16: MCU_TARGET = atmega16 atmega16: CFLAGS += '-DLED_START_FLASHES=3' '-DBAUD_RATE=115200' '-DBIGBOOT' atmega16: AVR_FREQ = 16000000L atmega16: LDSECTIONS = -Wl,--section-start=.text=0xfc00 atmega16: $(PROGRAM)_atmega16.hex atmega16: $(PROGRAM)_atmega16.lst atmega16_isp: atmega16 atmega16_isp: TARGET = atmega16 atmega16_isp: MCU_TARGET = atmega16 # 1024 byte boot atmega16_isp: HFUSE = D9 # Low power xtal (16MHz) 16KCK/14CK+65ms atmega16_isp: LFUSE = FF # 2.7V brownout atmega16_isp: isp
and added this to pin_def.h
#if defined(__AVR_ATmega16__) //Name conversion R.Wiersma #define UCSR0A UCSRA #define UDR0 UDR #define UDRE0 UDRE #define RXC0 RXC #define FE0 FE #define TIFR1 TIFR #define WDTCSR WDTCR #endif
but all this is just a guess
I'm not too sure on what else i have to change/add Iknow that im trying to reinvent the wheel :) but it's just how i like to learn.
so hope you guys can help.