[CCC DEV] ATmega1280 question

Matt Jadud jadudm at gmail.com
Thu Jun 10 14:50:49 BST 2010


Hi all,

I have a bit of code lying around with some compiler defines added to
support the increased number of pins on the Arduino Mega. I used this
in the "Runaway Bunny" project in the fall, and specifically was able
to use it to make use of the (4?) clocks on that part for PWM
generation.

For multiple parts in the family, is it appropriate to add #IF
directives in the code in critical places (eg. constant definitions
and the like)? Or, would it be nicer if I broke those kinds of things
out into separate files, so we could just #IF in a whole file based on
the part?

I don't see us supporting a lot of AVR parts, necessarily, but I also
suspect the ATmega1281 is going to show up on a board someday soon,
and it certainly is a nice part. (It's a 1280, but lower voltage and
with DMA support, among other things.) I can also "just do something
reasonably sensible" and we can update/modify/revise later.

I only ask because we're going to be using the ArduPilot Mega, which
uses the 1280... so, getting those things into the tree and beginning
to support that larger part makes a certain amount of sense. Of
course, it also raises the question of multiple .hex outputs for
different targets for firmware upload... but, one bridge at a time...

Cheers,
Matt




More information about the developers mailing list