Arduino Forum

Using Arduino => Microcontrollers => Topic started by: jtw11 on Nov 03, 2012, 08:09 pm

Title: Creating pin definitions & boards.txt entries
Post by: jtw11 on Nov 03, 2012, 08:09 pm
Hi all,

I've been working on a design using an Atmega1284P-PU in the DIP package, however due to space constraints may have to switch to the 1284P-AU in the TQFN package.

Now, I'm not using a bootloader - I am simply flashing with an AVR ISP Mk II over ICSP.  I will still have USB communications available for serial debugging and SD storage download, however that is another story. How would I go about using the P-AU version with the Ardunio IDE?

1) I'm assuming i'll need to make another entry in boards.txt as the device signature will be different.
2) Regarding fuses and lockbits etc, I'll set these with Atmel Studio - so all the trouble people have been having with bootloaders, is not a problem here.
3) Setting pin definitions, again - i'm assuming another file will be needed somewhere here? Here is where I'm a little lost.
Title: Re: Creating pin definitions & boards.txt entries
Post by: Steph on Nov 04, 2012, 02:25 pm
My understanding is that the package doesn't matter, so you should not need another pin definition file or boards.txt entry.

Eg. the UNO does not have two entries for the DIP versus SMD versions.
Title: Re: Creating pin definitions & boards.txt entries
Post by: jtw11 on Nov 04, 2012, 02:59 pm
Does the device signature not change then between package type?
Title: Re: Creating pin definitions & boards.txt entries
Post by: Steph on Nov 04, 2012, 10:44 pm
I don't think the signature is package-dependant. I can't say for sure with the '1284p but with the 328's I've used, it didn't matter if they were DIP or SMD.
Title: Re: Creating pin definitions & boards.txt entries
Post by: CrossRoads on Nov 04, 2012, 11:25 pm
1. 1284P-PU, 1284P-AU, 1284P-MU all have the same device signature.
2. That's one way to do it. I use my MKii to burn a bootloader to set the fuses, and then File:Upload using Programmer to load the sketch.  Mostly because I don't like waiting around for Atmel Studio start up.
3.  Pins_arduino.h is the same for package to package. It maps the software names to port names. The software doesn't care how you then get from the port to the physical pin or what the physical pin numbers are.
Title: Re: Creating pin definitions & boards.txt entries
Post by: westfw on Nov 05, 2012, 01:56 am
See the diffs attached to http://code.google.com/p/arduino/issues/detail?id=1055 for some additional documentation on pins_arduino.h
Title: Re: Creating pin definitions & boards.txt entries
Post by: jtw11 on Nov 06, 2012, 12:05 pm

2. That's one way to do it. I use my MKii to burn a bootloader to set the fuses, and then File:Upload using Programmer to load the sketch.  Mostly because I don't like waiting around for Atmel Studio start up.


Many thanks again - that's how I successfully did my 1284P-PUs, I just thought that a different signature would mean different bootloader, but now I know it's all the same.

Cheers!