Go Down

Topic: ATMEL Mega1284P evaluation board avalible (Read 76 times) previous topic - next topic

skyjumper


Don't you just love breathing life into a new board? When it works of course :)


Well, if it does not work, well then you have not breathed life into it ;-)

So everyone, Bob has worked his butt off on this board. The least we can all do is buy one from him!

CrossRoads

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

mnmis

Here is the pins_arduino.c that I have been using that works with many processors.

CrossRoads

Thanks mnmis.
This section (actually the 2 above it, but the end results are obvious in this one) show the resulting pin mapping from PA-1 ... PD-7 to the D0-D31 that show up on the actual IO.  My board uses them somewhat differently.
I will modify this to reflect mine & check it out. I had the hardest time getting this info pulled in by the IDE, finally resorting to removing everything but my 1284 needs.

If I had understood how this worked  when I was assigning pin usage on the board, I may have assigned pin usage differently.
As it was, I tried to match pin usages to reflect the Duemilanove pin usage on shield headers for maximum compatibility.

Code: [Select]

const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
{
NOT_ON_TIMER, /* 0  - PB0 */
NOT_ON_TIMER, /* 1  - PB1 */
NOT_ON_TIMER, /* 2  - PB2 */
TIMER0A,      /* 3  - PB3 */
TIMER0B,                 /* 4  - PB4 */
NOT_ON_TIMER, /* 5  - PB5 */
NOT_ON_TIMER, /* 6  - PB6 */
NOT_ON_TIMER, /* 7  - PB7 */
NOT_ON_TIMER, /* 8  - PD0 */
NOT_ON_TIMER, /* 9  - PD1 */
NOT_ON_TIMER, /* 10 - PD2 */
NOT_ON_TIMER, /* 11 - PD3 */
TIMER1B,      /* 12 - PD4 */
TIMER1A,      /* 13 - PD5 */
TIMER2B,      /* 14 - PD6 */
TIMER2A,      /* 15 - PD7 */
NOT_ON_TIMER, /* 16 - PC0 */
NOT_ON_TIMER,   /* 17 - PC1 */
NOT_ON_TIMER,   /* 18 - PC2 */
NOT_ON_TIMER,   /* 19 - PC3 */
NOT_ON_TIMER,   /* 20 - PC4 */
NOT_ON_TIMER,   /* 21 - PC5 */
NOT_ON_TIMER,   /* 22 - PC6 */
NOT_ON_TIMER,   /* 23 - PC7 */
NOT_ON_TIMER,   /* 24 - PA0 */
NOT_ON_TIMER,   /* 25 - PA1 */
NOT_ON_TIMER,   /* 26 - PA2 */
NOT_ON_TIMER,   /* 27 - PA3 */
NOT_ON_TIMER,   /* 28 - PA4 */
NOT_ON_TIMER,   /* 29 - PA5 */
NOT_ON_TIMER,   /* 30 - PA6 */
NOT_ON_TIMER   /* 31 - PA7 */
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

mnmis

CrossRoads,

Keeping pin compatibly across the different processors isn't too high on my priority.

I just keep track of the pin differences and update the code when necessary.

Mnmis

Go Up