ATmega2560 bootloader to use more i/o pins

Not a problem! :slight_smile: In that previous message, the pins_arduino.c says that just about every pin is available for I/O, the exception being PB6 + 7. Why this is, I'm not sure, and these pins ARE used on the official MEGA. I'm pretty certain, then, that these pins can be used, giving us a total of 70 digital and 16 analog pins. Among the digital are four UART ports, one SPI port, one JTAG port, and I2C/TWI port, and several pins that can be used for an external parallel memory interface (16 address/data pins and three strobes). There are 15 pins with PWM connections, and the official MEGA uses RX0 and TX0 for PWM as well. It's strange, though, that pin 26 (PB7/ digital pin 13) has two PWM timers wired to it: 0A and 1C. Anyway, that's 17 PWMs that I can see, and only two of them coincide with communication pins (unlike the ATmega328, which uses half its PWMs for SPI pins. I've tabulated my findings so far below:

A couple things to note: there are 11 ports ranging from A-L, excluding I. Port G only has six pins.

A Com PWM Int I/O
PA0 D
PA1 D
PA2 D
PA3 D
PA4 D
PA5 D
PA6 D
PA7 D
B Com PWM Int I/O
PB0 SS PC0 D
PB1 SCK PC1 D
PB2 MOSI PC2 D
PB3 MISO PC3 D
PB4 2A PC4 D
PB5 1A PC5 D
PB6 1B PC6 D
PB7 0A+1C PC7 D
C Com PWM Int I/O
PC0 D
PC1 D
PC2 D
PC3 D
PC4 D
PC5 D
PC6 D
PC7 D
D Com PWM Int I/O
PD0 SCL EX0 D
PD1 SDA EX1 D
PD2 RX1 EX2 D
PD3 TX1 EX3 D
PD4 D
PD5 D
PD6 D
PD7 D
E Com PWM Int I/O
PE0 RX0 PC8 D
PE1 TX0 D
PE2 D
PE3 3A D
PE4 3B EX4 D
PE5 3C EX5 D
PE6 EX6 D
PE7 EX7 D
F Com PWM Int I/O
PF0 A
PF1 A
PF2 A
PF3 A
PF4 TCK A
PF5 TMS A
PF6 TDO A
PF7 TDI A
G Com PWM Int I/O
PG0 wr D
PG1 rd D
PG2 ale D
PG3 D
PG4 D
PG5 0B D
H Com PWM Int I/O
PH0 RX2 D
PH1 TX2 D
PH2 D
PH3 4A D
PH4 4B D
PH5 4C D
PH6 2B D
PH7 D
J Com PWM Int I/O
PJ0 RX3 PC9 D
PJ1 TX3 PC10 D
PJ2 PC11 D
PJ3 PC12 D
PJ4 PC13 D
PJ5 PC14 D
PJ6 PC15 D
PJ7 D
K Com PWM Int I/O
PK0 PC16 A
PK1 PC17 A
PK2 PC18 A
PK3 PC19 A
PK4 PC20 A
PK5 PC21 A
PK6 PC22 A
PK7 PC23 A
L Com PWM Int I/O
PL0 D
PL1 D
PL2 D
PL3 5A D
PL4 5B D
PL5 5C D
PL6 D
PL7 D