Using ATmega1284 with Arduino IDE


A little while ago when working at a project on the reading of several rotary encoders, I felt the need to move from ATmega32 to an ATmega which have 40 pins but also to have new interrupts PCINT.

After a quick check with local stores sites I decided to move to the new ATmega1284 microcontroller (16k SRAM, 128k Flash, 2 UART, 32 IO Pins, 8 Analog Inputs and 20 MHZ maximum frequency).I have not studied in detail and I assumed (wrong) it is the same as ATmega1284P.

Soon I was to discover that although there are plenty of resources to use ATmega1284P in Arduino, for ATmega1284 (without P) situation was different.

In arduino 1.5.2 (the version I had installed at the time) I did not find header file iom1284.h in […\arduino-1.5.8\hardware\tools\avr\avr\include\avr], instead I found iom1284p.h.

Before I try to manually add the file, I downloaded the latest version of Arduino namely 1.5.8 and I was pleasantly surprised to see that the file iom1284.h was in place (along with iom1284p.h of course). Good sign.

I make a folder: […\arduino-1.5.8\hardware\arduino\avr\variants\ATmega1284] and put file pins_arduino.h  in place.

I added following information to file […\arduino-1.5.8\hardware\arduino\avr\boards.txt]

Append the content of AVRDUDE_ATmega1284.conf to file […\arduino-1.5.8\hardware\tools\avr\etc\avrdude.conf]

Please note there are no bootloader in my setup since I’m always using USBasp to upload.



Related posts:


Updated: March 30, 2015 — 2:17 pm

Leave a Reply

Your email address will not be published. Required fields are marked *

OpenHardware.Ro © 2017 Frontier Theme