View previous topic :: View next topic |
Author |
Message |
Guest
|
SPI connection? |
Posted: Wed Sep 30, 2009 1:21 pm |
|
|
Hi
I confused because Code: | en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#3-Wire_Serial_Buses |
describe in picture that SDI must be connected to SDI. But in text they describe that SDI must go to SDO.
What I want to is connect a PIC to a SPI device.
Is it SDI to SDI or SDI to SDO? |
|
|
bungee-
Joined: 27 Jun 2007 Posts: 206
|
|
Posted: Wed Sep 30, 2009 1:26 pm |
|
|
Typically on devices would be marked from the device point of view. That would mean that SDO from PIC would go to SDI on device and vice versa.
SDO <-- Output
SDI <-- Input
SCK <-- Clock controlled by "master" device.
Hope this explains this field.
|
|
|
Guest
|
|
Posted: Wed Sep 30, 2009 2:06 pm |
|
|
|
|
|
FvM
Joined: 27 Aug 2008 Posts: 2337 Location: Germany
|
|
Posted: Wed Sep 30, 2009 2:21 pm |
|
|
You're quoting the wikipedia site incorrectly.
Quote: | describe in picture that SDI must be connected to SDI |
No picture uses SDI or SDO on that site. They are actually using MISO/MOSI notation, which is a completely different thing. This are the original Motorola terms, and they have the advantage that the nodes carry the same signal names from driver to receiver. |
|
|
Guest
|
|
Posted: Thu Oct 01, 2009 9:26 am |
|
|
Now confusing is near 100%
At the wiki page on the top there are some picture. The same pin master and slave is connected, right?
Code: | en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Daisy_chain_SPI_configuration
|
I want to connect a PIC to a SPI device.
SDO(PIC) -> SPI_x(SDI)
SDI(PIC) <- SPI_x(SDO)
Right? |
|
|
Ttelmah Guest
|
|
Posted: Thu Oct 01, 2009 9:43 am |
|
|
Yes.
Think about what the various terms 'say', rather than the abreviations.
The original Motorola terms, MOSI, and MISO, were 'Master Out Slave In', and 'Master In Slave Out'.
The PIC terms, are SDO, SDI 'SPI Data out', and 'SPI Data In'.
Code: |
Master Master Slave Slave
MISO MOSI MISO MOSI
SDI SDO SDO SDI
(fixed pitch required)
|
SDI, always connects to SDO, SDO to SDI, MOSI, to MOSI, and MISO to MISO. The Motorola terms, have the advantage of using the same term for the pins that connect, swapping the direction in the term (so the master is 'out', for the slave 'in'), while the PIC nomenaclature requires _you_ to remember to connect one devices 'out' to the other's 'in'.
Remember you also need SCL. |
|
|
|