Arduino Due SPI

Hello all,

I have a sensor and I want to communicate it with the DUE through SPI. When I looked for the pins for SPI. There was two set of pins to be used. One is with the ICSP header adn other is the SPI header. I program the DUE through the programming port (usb). I am really confused. I have attached the pic of the description.I guess the order of the pins are exactly the replica from the board so that I can just keep the board as per the figure and connect it. Which is the best way? ICSP connectio or SPI connection?

Thanks in advance

spi.png|768x480

See pinout diagram from Greynomad. PA25, PA27, PA26 are the SPI pins.

so we should use the SPI instead of the ICSP ?

Use ONLY SPI pins for SPI !

This link https://www.arduino.cc/en/reference/SPI under the heading connections led me to confusion. So the 4th pin can be used as CS?

You might be interested by these 2 threads to dig into DUE SPI capabilities:

http://forum.arduino.cc/index.php?topic=254102.0

http://forum.arduino.cc/index.php?topic=197083.0