Arduino Mega PIN mapping

After I found the page on Pin Mapping for the Mega I noticed the list wasn’t in a nice readable order. I went through the entire list and came up with a new list that should be easier to read so you can find the info you want quicker.

I have attached the file as txt.

It may help others.

/*

*** Arduino Mega 2560 Pin Mapping ***

*** DIGITAL PINS ***

Pin 0  = PORTE0 (RXD0 / PCINT8 ) (RX0)
Pin 1  = PORTE1 (TXD0) (TX0)
Pin 2  = PORTE4 (OC3B / INT4) (PWM)
Pin 3  = PORTE5 (OC3C / INT5) (PWM)
Pin 4  = PORTG5 (OC0B) (PWM)
Pin 5  = PORTE3 (OC3A / AIN1) (PWM)
Pin 6  = PORTH3 (OC4A) (PWM)
Pin 7  = PORTH4 (OC4B) (PWM)
Pin 8  = PORTH5 (OC4C) (PWM)
Pin 9  = PORTH6 (OC2B) (PWM)
Pin 10 = PORTB4 (OC2A / PCINT4) (PWM)
Pin 11 = PORTB5 (OC1A / PCINT5) (PWM)
Pin 12 = PORTB6 (OC1B / PCINT6) (PWM)
Pin 13 = PORTB7 (OC0A / OC1C / PCINT7) (PWM)
Pin 14 = PORTJ1 (TXD3 / PCINT10) (TX3)
Pin 15 = PORTJ0 (RXD3 / PCINT9) (RX3)
Pin 16 = PORTH1 (TXD2) (TX2)
Pin 17 = PORTH0 (RXD2) (RX2)
Pin 18 = PORTD3 (TXD1 / INT3) (TX1)
Pin 19 = PORTD2 (RXD1 / INT2) (RX1)
Pin 20 = PORTD1 (SDA / INT1) (SDA)
Pin 21 = PORTD0 (SCL / INT0) (SCL)
Pin 22 = PORTA0 (AD0)
Pin 23 = PORTA1 (AD1)
Pin 24 = PORTA2 (AD2)
Pin 25 = PORTA3 (AD3)
Pin 26 = PORTA4 (AD4)
Pin 27 = PORTA5 (AD5)
Pin 28 = PORTA6 (AD6)
Pin 29 = PORTA7 (AD7)
Pin 30 = PORTC7 (A15)
Pin 31 = PORTC6 (A14)
Pin 32 = PORTC5 (A13)
Pin 33 = PORTC4 (A12)
Pin 34 = PORTC3 (A11)
Pin 35 = PORTC2 (A10)
Pin 36 = PORTC1 (A9)
Pin 37 = PORTC0 (A8)
Pin 38 = PORTD7 (T0)
Pin 39 = PORTG2 (ALE)
Pin 40 = PORTG1 (RD)
Pin 41 = PORTG0 (WR)
Pin 42 = PORTL7
Pin 43 = PORTL6
Pin 44 = PORTL5 (OC5C)
Pin 45 = PORTL4 (OC5B)
Pin 46 = PORTL3 (OC5A)
Pin 47 = PORTL2 (T5)
Pin 48 = PORTL1 (ICP5)
Pin 49 = PORTL0 (ICP4)
Pin 50 = PORTB3 (MISO / PCINT3)
Pin 51 = PORTB2 (MOSI / PCINT2)
Pin 52 = PORTB1 (SCK / PCINT1)
Pin 53 = PORTB0 (SS / PCINT0)

*** ANALOG PINS ***

Pin 0  = PORTF0 (ADC0)
Pin 1  = PORTF1 (ADC1)
Pin 2  = PORTF2 (ADC2)
Pin 3  = PORTF3 (ADC3)
Pin 4  = PORTF4 (ADC4 / TMK)
Pin 5  = PORTF5 (ADC5 / TMS)
Pin 6  = PORTF6 (ADC6)
Pin 7  = PORTF7 (ADC7)
Pin 8  = PORTK0 (ADC8 / PCINT16)
Pin 9  = PORTK1 (ADC9 / PCINT17)
Pin 10 = PORTK2 (ADC10 / PCINT18)
Pin 11 = PORTK3 (ADC11 / PCINT19)
Pin 12 = PORTK4 (ADC12 / PCINT20)
Pin 13 = PORTK5 (ADC13 / PCINT21)
Pin 14 = PORTK6 (ADC14 / PCINT22)
Pin 15 = PORTK7 (ADC15 / PCINT23)

*** OTHER PINS ON CHIP ***

Chip pin 4   = PORTE2 (XCK0 / AIN0)
Chip pin 8   = PORTE6 (T3 / INT6)
Chip pin 9   = PORTE7 (CLKO / ICP3 / INT7)
Chip pin 10  = VCC
Chip pin 11  = GND
Chip pin 14  = PORTH2 (XCK2)
Chip pin 27  = PORTH7 (T4)
Chip pin 28  = PORTG3 (TOSC2)
Chip pin 29  = PORTG4 (TOSC1)
Chip pin 30  = RESET
Chip pin 31  = VCC
Chip pin 32  = GND
Chip pin 33  = XTAL2
Chip pin 34  = XTAL1
Chip pin 47  = PORTD4 (ICP1)
Chip pin 48  = PORTD5 (XCK1)
Chip pin 49  = PORTD6 (T1)
Chip pin 61  = VCC
Chip pin 62  = GND
Chip pin 65  = PORTJ2 (XCK3 / PCINT11)
Chip pin 66  = PORTJ3 (PCINT12)
Chip pin 67  = PORTJ4 (PCINT13)
Chip pin 68  = PORTJ5 (PCINT14)
Chip pin 69  = PORTJ6 (PCINT15)
Chip pin 79  = PORTJ7
Chip pin 80  = VCC
Chip pin 81  = GND
Chip pin 98  = AREF (Analog Reference)
Chip pin 99  = GND
Chip pin 100 = AVCC (VCC)

*/

Source: Arduino - PinMapping2560

ArduinoMegaPinMapping.txt (2.92 KB)

That's pretty cool. Have you got one of these?