Version 0.84 (20081106)

This commit is contained in:
Olaf Rempel 2009-02-05 15:33:11 +01:00
parent 7c18de72f8
commit 751dfff780
4 changed files with 71 additions and 0 deletions

View File

@ -37,6 +37,9 @@ typedef uint8_t pagebuf_t;
#elif defined(__AVR_ATmega324P__) #elif defined(__AVR_ATmega324P__)
#include "mega324p.h" #include "mega324p.h"
#elif defined(__AVR_ATmega64__)
#include "mega64.h"
#elif defined(__AVR_ATmega644__) #elif defined(__AVR_ATmega644__)
#include "mega644.h" #include "mega644.h"

View File

@ -43,6 +43,7 @@
## MCU = atmega169 ## MCU = atmega169
## MCU = atmega32 ## MCU = atmega32
MCU = atmega324p MCU = atmega324p
## MCU = atmega64
## MCU = atmega644 ## MCU = atmega644
## MCU = atmega644p ## MCU = atmega644p
## MCU = atmega128 ## MCU = atmega128
@ -170,6 +171,23 @@ ifeq ($(BOOTSIZE), 2048)
endif endif
endif endif
##
ifeq ($(MCU), atmega64)
BFD_MACH=avr5
ifeq ($(BOOTSIZE), 512)
MT_BOOTLOADER_ADDRESS = 0xFC00
endif
ifeq ($(BOOTSIZE), 1024)
MT_BOOTLOADER_ADDRESS = 0xF800
endif
ifeq ($(BOOTSIZE), 2048)
MT_BOOTLOADER_ADDRESS = 0xF000
endif
ifeq ($(BOOTSIZE), 4096)
MT_BOOTLOADER_ADDRESS = 0xE000
endif
endif
## ##
ifeq ($(MCU), atmega644) ifeq ($(MCU), atmega644)
BFD_MACH=avr5 BFD_MACH=avr5

46
mega64.h Normal file
View File

@ -0,0 +1,46 @@
#ifndef _MEGA64_H_
#define _MEGA64_H_
/* Part-Code ISP */
#define DEVTYPE_ISP 0x45
/* Part-Code Boot */
#define DEVTYPE_BOOT 0x46
#define SIG_BYTE1 0x1E
#define SIG_BYTE2 0x96
#define SIG_BYTE3 0x02
#ifdef UART_DOUBLESPEED
#define UART_CALC_BAUDRATE(baudRate) (((F_CPU*10UL) / ((baudRate) *8UL) +5)/10 -1)
#else
#define UART_CALC_BAUDRATE(baudRate) (((F_CPU*10UL) / ((baudRate)*16UL) +5)/10 -1)
#endif
#ifndef UART_USE_SECOND
#define UART_BAUD_HIGH UBRR0H
#define UART_BAUD_LOW UBRR0L
#define UART_STATUS UCSR0A
#define UART_TXREADY UDRE0
#define UART_RXREADY RXC0
#define UART_DOUBLE U2X0
#define UART_CTRL UCSR0B
#define UART_CTRL_DATA ((1<<TXEN0) | (1<<RXEN0))
#define UART_CTRL2 UCSR0C
#define UART_CTRL2_DATA ((1<<UCSZ01) | (1<<UCSZ00))
#define UART_DATA UDR0
#else
#define UART_BAUD_HIGH UBRR1H
#define UART_BAUD_LOW UBRR1L
#define UART_STATUS UCSR1A
#define UART_TXREADY UDRE1
#define UART_RXREADY RXC1
#define UART_DOUBLE U2X1
#define UART_CTRL UCSR1B
#define UART_CTRL_DATA ((1<<TXEN1) | (1<<RXEN1))
#define UART_CTRL2 UCSR1C
#define UART_CTRL2_DATA ((1<<UCSZ11) | (1<<UCSZ10))
#define UART_DATA UDR1
#endif
#endif // #ifndef _MEGA64_H_

View File

@ -30,6 +30,10 @@ Programming-Software (on the "PC-Side"):
* Installation instructions at the end of this file. * Installation instructions at the end of this file.
6. Nov. 2008 - Version 0.84
* Added definitions for ATmega64 provided by Pavel Fertser - Thanks.
12. Apr. 2008 - Version 0.83 12. Apr. 2008 - Version 0.83
* Added definitions for ATmega644P and ATmega324P * Added definitions for ATmega644P and ATmega324P