diff --git a/Makefile b/Makefile index cb6161a..bfede5c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PRG = twiboot OBJ = main.o -MCU_TARGET = atmega8 +MCU_TARGET = atmega88 OPTIMIZE = -Os DEFS = @@ -41,4 +41,4 @@ bin: $(PRG).bin $(OBJCOPY) -j .text -j .data -O binary $< $@ install: text - uisp -dprog=avr910 -dserial=/dev/ttyS0 -dspeed=115200 -dpart=M8 --erase --upload if=$(PRG).hex + uisp -dprog=avr910 -dserial=/dev/ttyS0 -dspeed=115200 -dpart=auto --erase --upload if=$(PRG).hex diff --git a/main.c b/main.c index 363509c..dee79b4 100644 --- a/main.c +++ b/main.c @@ -45,8 +45,9 @@ * LED on PORTB4 blinks with 20Hz (while bootloader is running) * LED on PORTB5 blinks on TWI activity * - * Fuse H: 0xda (512 words bootloader) - * Fuse L: 0x84 (8Mhz internal RC-Osz., 2.7V BOD) + * Fuse E: 0xfa (512 words bootloader) + * Fuse H: 0xdd (2.7V BOD) + * Fuse L: 0xc2 (8Mhz internal RC-Osz.) * * bootloader twi-protocol: * - get info about bootloader: @@ -71,8 +72,8 @@ * SLA+W, 0x1F, STO */ -const static uint8_t info[16] = "TWIBOOT m8-v1.2"; -const static uint8_t signature[4] = { 0x1E, 0x93, 0x07, 0x00 }; +const static uint8_t info[16] = "TWIBOOT m88-v12"; +const static uint8_t signature[4] = { 0x1E, 0x93, 0x0A, 0x00 }; /* wait 40 * 25ms = 1s */ volatile static uint8_t boot_timeout = 40; @@ -115,8 +116,8 @@ void write_eeprom_byte(uint8_t val) EEDR = val; addr++; - EECR |= (1<