I've read this reference page http://arduino.cc/en/Reference/DueExtendedSPI about SPI on Arduino Due and it says that you can set the CS pin (what's CS btw?) and it gives an example, where it says that
If using multiple devices with different CS pins, you'll need to declare those pins in setup(). In the following example, there are two devices that share the SPI MISO, MOSI, and SCK pins. One device CS is attached to pin 4, the other to pin 10.
and the code is this
void setup(){
// initialize the bus for a device on pin 4
SPI.begin(4);
// initialize the bus for a device on pin 10
SPI.begin(10);
}
If the CS pin is pin 4, which pins are the MISO, MOSI and SCK?
If I have shift register for reading and writing, which pins should I use?
SPI: SPI header (ICSP header on other Arduino boards)
These pins support SPI communication using the SPI library. The SPI pins are broken out on the central 6-pin header, which is physically compatible with the Uno, Leonardo and Mega2560. The SPI header can be used only to communicate with other SPI devices, not for programming the SAM3X with the In-Circuit-Serial-Programming technique. The SPI of the Due has also advanced features that can be used with the Extended SPI methods for Due.
Apparently, you'll have to look at the schematic for the Due to figure out exactly which of the 6 pins is MISO, MOSI, etc.
Apparently, you'll have to look at the schematic for the Due to figure out exactly which of the 6 pins is MISO, MOSI, etc.
You're right. Did that and found the SS pin, which is pin 10 (SS0 actually), and on the top right part of the schematic I can see an SPI chip(?) where the MISO, MOSI and SPCK pins are (I guess the SPCK is what I've seen on SPI shift register tutorials as SCK, or not?). The thing is that I don't know much about schematics and can't understand on which header these pins go. I can distinguish the headers in the schematic, but the only connection I can see with the above mentioned pins is to the mail processor chip, where they are the pins with numbers 108., 109 and 110 respectively. Can someone help me out by pointing out which headers I should plug my jumper wires in?
The schematic is here http://arduino.cc/en/uploads/Main/arduino-Due-schematic.pdf
Ok, get it, thanks. The thing is that I actually have a Udoo board, and these headers are not there, so I guess I'll have to ask in Udoo's forum. But the link you provided makes thing much clearer.