mega1284 AVRISPMKII and arduino

Hi,
So I want to write programs in arduino, but use the mega1284s I have lying around. I also have a MKII programmer, so using a breadboard, it shouldnt be too difficult?
What do I need to do in terms of arduino software? I suppose I need it to know what pins are what - arduino numbering i mean?
Anyone got or can give me a step by step to doing this?
Thanks
A

Modify the above schematic to include an isp connection and you are good to go. Just don't bother with a bootloader (other than to configure the fuses)

Yeah wasnt going to bother with a bootloader.
So write my code as though I am writing it for 1284p.
Compile it, then Shift Upload and Im off? Do I need a certain library file so that it knows which digital pin is which etc?

Yes, you need some specific files

Set up per this, has the Core files needed, and pins_arduino.h that maps the software names to the hardware pins.
The Bobuino variation supports these boards which I provide as bare boards (or populated) for anyone interested.



PLs & schematics posted here Cross Roads Electronics

a.mlw.walker:
Yeah wasnt going to bother with a bootloader.
So write my code as though I am writing it for 1284p.
Compile it, then Shift Upload and Im off? Do I need a certain library file so that it knows which digital pin is which etc?

The reason that I recommneded following the procedure described at the link above, including the burning the bootloader, is that it is an easy way to ensure that the fuses are programmed correctly, at the same time it confirms that the chip has the isp wired correctly. The bootloader serves no other purpose in this instance, and will be erased the next time you program via isp.

As for libraries, etc... The procedure above will install everything needed to program the 1284; however, pay attention to which "bootloader" you choose since that will vary which pins are mapped to which variables...

I don't think the bootloader does the pins. I believe that mapping is made when the board type is selected and the sketch is compiled and pins_arduino.h for the board variant is called out. You can see this in the boards.txt file, where for the 1284's for instance optiloader_1284atmega.hex (something like that) is called out for each boards, while there is a different path called out somehow to bring in pins_arduino.h from different folders.

No your right I didn't mean to imply that burning the bootloader configured the pins but I have experienced what I believe is probably a bug where the ids didn't change the pins when switching boards for the same core... bobuino/mighty ohm

May be unique to 1.0.1 on unbuntu 12.04

Hello,

I'm creating a datalogger for industrial use. My prototype has an Arduino Mega 2560 + Ethernet shield. Eventually, I will create my own PCB, dedicated to my own wishes. I would actually like to use the MEGA1284P, because it's much cheaper and has more memory than the MEGA328.

Would it work if I just follow the steps shown here? Just to sum them up, so I didn't mis one:

  1. connect MEGA1284P to USB via FT232 chip
  2. use specific files posted by CrossRoads
  3. Maybe change some pinnumbers

What about a bootloader? 'can't really figure that out in this conversation. And the bootloader can be programmed using the FT232, right?

You need some form of isp or parallel programmer to place a bootloader on the chip if you just want to use the FTDI for downloading; however, using a ISP header and something like the AVR ISP MKII (~$35) is a better solution in my opinion

Bootloader or sketch can be installed via the ICSP pins using an ICSP programmer.
Bootloader can not be installed via serial connection.

After a bootloader is installed, than a sketch can be loaded via the serial connection (USB/Serial Adapter such as FTDI module or cable, or a CP2102 module (with minor wiring mod to disconnect its reset and bring out DTR).