Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/05/11 06:43
Modified:
  07/05/11 06:59

Read: times


 
#182805 - No, SPI does *not* have both commands and data!
Responding to: ???'s previous message
No, it doesn't!

You must be thinking of I2C ?

SPI defines only the hardware "interface"[1] - it says nothing about any "protocol"[1] for any meaning of the bits transferred.

I2C, on the other hand, defines both a hardware "interface" - and a "protocol" for addressing (including read/write direction), acknowledging, and encapsulating messages.

See: http://www.byteparadigm.com/kb/articl...ocols.html

Richard Erlacher said:
I haven't used it in several years, but it seems to me there IS an overlying protocol.

So you've been mistaken for all those years!

you have to tell the device what to do.

Of course, specific devices will define their own "protocol" for the meaning of the bits transferred over their SPI connection, but this is specific to the particular slave implementation - it is nothing specifically to do with SPI itself.



While it may be possible to make some SPI masters drive some ttl-lookalike SIPO registers, it's not likely you'll make it work with all of them.

That may be true - but it's a limitation of the Master implementation - not inherent in SPI itself.

you have to tell the slave whether it's receiving data from the master or transmitting it.

No - not at all!

That's why there are separate MOSI amd MISO lines!

MOSI = Master Output, Slave Input;
MISO = Master Input, Slave Output.

So the direction of the data is known implicitly from which line it's on!

That's done by means of a command.

A specific slave may define its own protocol to work that way - but it is not inherent in SPI itself.

You also have to tell it something about the clock data relationship

No - the Slave defines that in its datasheet; the Master has to be "told" (ie, configured appropriately).


An advantage of SPI (and big difference from I2C) is precisely that it defines none of these things - giving you complete freedom to use it however you like!
As the Wikipedia article that you cited says,

Wikipedia said:
Advantages
:
:
* Complete protocol flexibility for the bits transferred
+ Not limited to 8-bit words
+ Arbitrary choice of message size, content, and purpose
:
:
http://en.wikipedia.org/wiki/Seri...Advantages

Did you actually read that article?

----------


[1] I'm just using the terms "interface" and "protocol" loosely here for the purposes of this specific argument - I'm not trying to make any claim that they should have specific, distinct meanings in general.

The hardware "interface" could equally be called the hardware "protocol" or Layer-0 "protocol", or whatever.

Don't get hung-up on this.

List of 49 messages in thread
TopicAuthorDate
problem rgarding uln and udn            01/01/70 00:00      
   They are different in every sense!            01/01/70 00:00      
      problem rgarding uln and udn            01/01/70 00:00      
         You forgot your links            01/01/70 00:00      
         Basic electronics            01/01/70 00:00      
            Clarification - more Basic Electronics            01/01/70 00:00      
            probelems regarding udn 2892            01/01/70 00:00      
               Still Basic electronics            01/01/70 00:00      
                  Links            01/01/70 00:00      
                     That'll be why he's still struggling after all these weeks!            01/01/70 00:00      
               open emitter            01/01/70 00:00      
                  Open collector            01/01/70 00:00      
         RE: i am not getting you            01/01/70 00:00      
   Did you really read datasheets?            01/01/70 00:00      
      problem rgarding uln and udn            01/01/70 00:00      
         relay matrix???            01/01/70 00:00      
         This doesn't make sense!            01/01/70 00:00      
            8x8 relay matrix?            01/01/70 00:00      
               relay matrix?            01/01/70 00:00      
                  not quite            01/01/70 00:00      
                  one interesting thing I learned            01/01/70 00:00      
               Unless...            01/01/70 00:00      
                  problem rgarding uln and udn            01/01/70 00:00      
                     lightning fast relays            01/01/70 00:00      
                        problems regarding uln and udn            01/01/70 00:00      
                           both            01/01/70 00:00      
                           None of this makes sense!            01/01/70 00:00      
                           It appears you need latching relays            01/01/70 00:00      
                              Latching relay is still slow            01/01/70 00:00      
                                 You're right, but the relay spec's should reveal that            01/01/70 00:00      
                              well, if he does ...            01/01/70 00:00      
                                 use toggle types ... they were around once ...            01/01/70 00:00      
                                    SPI + latched shift registers are good choices            01/01/70 00:00      
                                       The protocol is good ... but not necesary here            01/01/70 00:00      
                                          SPI is excellent for driving long shift registers            01/01/70 00:00      
                                             tell us, Per, what data types does SPI support?            01/01/70 00:00      
                                                Making Mountain Out Of Mole Hill            01/01/70 00:00      
                                                   protocol and/or command structure            01/01/70 00:00      
                                                No, SPI does *not* have both commands and data!            01/01/70 00:00      
                                                   Where you sit determines what you see            01/01/70 00:00      
                                                      Totally missing the point            01/01/70 00:00      
                                                         The major advantage            01/01/70 00:00      
                                                      Where Richard Sits......            01/01/70 00:00      
                                                         From where I sit...            01/01/70 00:00      
                                                      Always important to follow up the progress of technology            01/01/70 00:00      
                     Language barrier?            01/01/70 00:00      
                        Further question            01/01/70 00:00      
                     Sorry, double posting...            01/01/70 00:00      
   Cross-Post?            01/01/70 00:00      

Back to Subject List