Go Down

Topic: MISO, MOSI and SCK pins on Arduino Due (Read 26309 times) previous topic - next topic


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
Code: [Select]
void setup(){
  // initialize the bus for a device on pin 4
  // initialize the bus for a device on pin 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?


what's CS btw?

Chip Select.

which pins are the MISO, MOSI and SCK?

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.
The art of getting good answers lies in asking good questions.


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




You better look at here:

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.


well I looked the whole diagram, there is no miso mosi pin ...wtf???


I have Due R3. MOSI, MISO, and CLK, I was not able to find them. However, some wrote 4,1,3 but I wasn't able to make SPI work. Anyone knows?


ard_newbie added an arrow to the pins, open the image in new browser tab for details.

This is SPI documentation:

Form section "Connections":

Go Up