Pages: [1]   Go Down
Author Topic: Pinout for Port Registers on Arduino Mega??  (Read 19830 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi there,

My Arduino program uses port registers extensively (PORTB, PORTD, etc).  Currently, I am merging the work of several Arduino Diecimilas onto one Arduino Mega but I can't find any conclusive information about how the Mega Pinout corresponds to the higher port registers (PORTE, PORTF, etc).  I see the port registers referenced on the 1280 data sheet and in the Arduino AVR code libraries, but could use some assistance.

Would someone please point me in the right direction?

Thank you!
Christopher Baker
christopherbaker.net
« Last Edit: June 17, 2009, 04:07:14 am by bakercp » Logged

London
Offline Offline
Faraday Member
**
Karma: 8
Posts: 6240
Have fun!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I posted a spreadsheet here that may help: http://spreadsheets.google.com/pub?key=rtHw_R6eVL140KS9_G8GPkA&gid=0
Logged

0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Unfortunately, I don't think anyoyone has made a pin mapping diagram for the mega yet.

Check the mega schematic for the ATmega1280.

For example, look at the top right corner of the 1280:  You'll see a group of 8 pins, ATmega pins 71 through 78.  These are labeled PAn, where n is 0 to 7.  These are the individual pins of PORTA, along with their corresponding signals (conveniently labeled PAn as well).  Now look to the right a bit at JP1, and you'll find these signals again.  The green text tells me these are arduino pins 22 through 29.

-j

Logged

0
Offline Offline
Faraday Member
**
Karma: 7
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Unfortunately, I don't think anyoyone has made a pin mapping diagram for the mega yet.
... and while I'm typing those words, mem posts one. smiley

-j

Logged

0
Offline Offline
Edison Member
*
Karma: 16
Posts: 1579
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this:




Regards,



Igor R.
Logged


0
Offline Offline
Newbie
*
Karma: 0
Posts: 7
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Beautiful.  Thanks all.
Logged

Kuala Lumpur
Offline Offline
Newbie
*
Karma: 0
Posts: 34
homebrew-tech.com | arduino-malaysia.com
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I know this is old topic. But having some problem with library that use PORTX registers. So shield that use the library work on Duemilanove and Uno but does not work with Arduino Mega2560 board.

The Shield make use of pin (digital I/O) 2,3,4,5,6 & 7.

I have applied above mapping (change code in the library) which still does not work.

One simple question. Is the port register mapping for ATMega1280 applies to ATMega2560? If not then it explain why still does not works!

TIA
Logged

Pages: [1]   Go Up
Jump to: