Arduino on an ATmega64M1

Hi,

i would like to change a Arduino Nano Board 3.0 from an Atmega328p to an Atmega64M1.

Can someone please help and answer this questions:

  1. Which Fuses should i set?
  2. How can i use the bootloader?
  3. How can i integrate this new board in the arduino Hardware list?

Thanks a lot.

Cu kami

The avr-gcc compiler supports the ATmega64M1, so it should be possible.

The Arduino IDE uses the file 'boards.txt' for the definition of the boards with the microcontrollers.
On my computer it is located at: ....arduino-1.0.5/hardware/arduino/boards.txt
Try to understand how the fuses and settings are for the original Nano.

Use this to make the same fuse settings for the ATmega64M1:
http://www.engbedded.com/fusecalc

You need to compile your own bootloader. The best option is to try to do that with Optiboot.
http://code.google.com/p/optiboot/

And you have to add your new board to boards.txt.

The bootloader and the fuses are probably the easiest part.

The arduino integration will require a "core" which sets up the registers and hardware. You will also have to have a pin map stored under the variants/ folder to map the pins to the pin names/numbers. Finally, the boards.txt entry has to be defined for the compiler and programming.

Some of the functionality may work with the default core and pin map, but you will likely have some analog pins and PWM pins that do not function.

I made a ATMega128a core and pin map. You will need to read up on the datasheet to complete this.

Hi,

thanks a lot for the really good answer and the nice introduction of the use of Arduino.

I just look through the different files and found out, that it is a little bit complicated for me.

How can i put the new informations about the µC in the optiboot files? What do i have to change?

How can i find out the different information about the Atmega64M1 for the boards.txt. Is there someone how can give me this change from the datasheets?

Thanks a lot for the help.

Cu kami

Please someone give me a little bit more help.

Cu kami