Author Topic: SPI pins  (Read 5717 times)

0 Members and 1 Guest are viewing this topic.


SPI pins
« on: October 21, 2013, 12:31:31 PM »
Hi I'm using de Wiring v1.1 for writing a microsd card conected to the SPI port (24 to 27 pins) cheching with the multimeter I got to the same layout shown here, where SCK is pin 25, MOSI to 26, and MISO to 27. However, checking several examples and pages like it says that MOSI is pin 25, MISO 26 and SCK 27.
So I don't really know really which is the valiz one, because maybe internally in the wiring programming the pin assign is made to correspond the actual one.

Anyone knows something about it?. Thank you very much


Re: SPI pins
« Reply #1 on: October 22, 2013, 11:59:38 PM »
SS = 24, MOSI = 26, MISO = 27, SCK  = 25 to avoid errors use the names (SS, MOSI, MISO, SCK) instead of pin numbers so your code will compile on any board.

For example: digitalWrite(SCK, HIGH); etc.
The diagram has an error, we will fix it. Thanks!.


Re: SPI pins
« Reply #2 on: November 11, 2013, 05:27:01 PM »
Oh god, I need to redesign my board.... so that's why it didn't work. Well thank you very much!!!!