Download Arduino Mega Spi Pinout Pics. With an spi connection there is always one master device (usually a microcontroller) which controls the peripheral devices. All analog pins can be used as digital i/o pins.
The spi pins are also broken out on the icsp header, which is physically compatible with the the mega 2560 also supports twi and spi communication.
These pins support spi communication using the spi library. The mega2560 has 16 analog inputs, each of which. Spi enable bit must be set to start communication with. The spi pins are also broken out on the icsp header, which is physically.