I have an Arduino Mega (2560 r3). I have a couple of questions:
If I use the ICSP header, does that directly link to pins 50 - 52. On the pinout diagrams it says 50, 51, 52 are on the block of connectors and the ICSP header.
Pin 53 is the default pin for slave select for SPI on the mega. If you want to have more than one slave select what pin do you use or can you chose?
Where is digital pin 54 on the mega? The arduino website says that it exists but it is not on any pinout diagram that I can see.
On the r3 mega board the pinout diagrams say that there are two I2C pairs of pins with the same pin numbers. Can you use one of them for I2C and one for digital?
Relating to the first question if you use say the ICSP header for SPI can you use pins 50, 51, 52 on the big block of connectors as normal digital pins?
I have only used the ICSP header for SPI on my Mega. AFAIK you cannot also use the other pins that are for the same functions - I believe they are just connected directly to the ICSP pins.
Yes. The ICSP SPI pins are connected directly to D50-D52.
D53 is the hardware slave select. It controls whether the SPI bus is a master or slave. You can use any other digital pin for a slave select. Normally for ethernet, D10 is the SS, and for the SD, D4 is the SS.
I'm not aware of a D54.
No. The Mega has only one I2C bus. The Due (EOL) has two I2C buses, and you can use the secondary I2c bus (Wire1), and use D20 and D21 for standard I/O.
Correct me if I am wrong.
You said "Yes. The ICSP SPI pins are connected directly to D50-D52." (q. 1)
You also said "No. They are directly connected to each other." (q. 5)
Those two statements contradict each other. Could you clarify this please?
Again correct me if i am wrong. If the ICSP header is connected to pins 50, 51, 52 than you could not use the pins (50, 51, 52) on the big block of connectors as digital pins.