Arduino Mega2560 R3 pinouts photo

Hi,

I tested a sketch with Nano and want to make sure it also runs on Mega 2560, which I do not have.

The sketch uses a pair of analog pins (A4 and A5) which are swapped alternatively between analog input and digital output with e.g. pinMode(A5, INPUT) then later pinMode(A5,OUTPUT) then repeat .

On Nano only pins A0 to A5 can be used in both modes, A6 and A7 can be used only as inputs. (Well the code compile and runs "fine" just that it does not work as it should when the pin is used in digital output mode)

My only concern here is there any such limitation with Mega2560 pins too? If yes, which pins?

thanks.