top of page

Professional Group

Public·101 members
Anthony Brooks
Anthony Brooks

Mega Key X1.txt


The ATmega1284 is a desirable chip to work with: it provides a generous 128 Kbytes of flash memory, 4 Kbytes of EEPROM, and 16 Kbytes RAM, twice as much RAM as the ATmega2560. It also has the advantage that it's available in a DIP package, so it fits on a prototyping board and is easy to wire up, and is nearly half the price of the ATmega2560. Surprisingly there isn't currently an official Arduino board based on it.




Mega Key X1.txt



If you're not interested in using the Arduino core functions, like millis() and digitalWrite(), the simplest way to program the ATmega1284 from the Arduino IDE is using In-System Programming (ISP) with an empty core, as described in my earlier article Using the Arduino IDE Without Cores.


Select the ATmega1284 @ 1 MHz (internal oscillator; BOD disabled) option on the Boards menu which is the default fuse setting on new ATmega1284s. Then upload the program using the Tiny AVR Programmer Board (see ATtiny-Based Beginner's Kit):


To select the 8 MHz internal oscillator select the ATmega1284 @ 8 MHz (internal oscillator; BOD disabled) option, and choose Burn Bootloader to set the fuses. Then upload the program again and the Blink program should flash eight times faster.


If you want to program the ATmega1284P using ISP, and use the Arduino core functions, the best option is to install Jack Christensen's Mighty 1284P core, which he has updated to work with version 1.6.x of the Arduino IDE [1].


I recommend using the "maniacbug" Mighty 1284p 16MHz using Optiboot option on the Boards menu, which gives the following assignments between the ATmega1284 pins and the Arduino inputs:


If you want to program the ATmega1284P via the serial port, and use the Serial Monitor for debugging, you will need a bootloader. You can either buy an ATmega1284P chip with a bootloader already installed, or install a bootloader yourself using ISP as described in the next section.


Unless you bought an ATmega1284P chip with a bootloader already installed, you'll first need to upload a bootloader using In-System Programming (ISP). Unfortunately the ISP programmer I usually use, Sparkfun's Tiny AVR Programmer, is not compatible with the 128 Kbyte program memory in the ATmega1284. Fortunately you can use an Arduino Uno as an ISP programmer [5]: 041b061a72


About

Welcome to the group! You can connect with other members, ge...

Members

bottom of page