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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/04/06 14:15
Read: times


 
#106464 - SPI standard
Responding to: ???'s previous message
SPI is a protocol without an official standard. The closest thing to a standard is the reference manual of the microcontroller that first introduced SPI, which was the (then) Motorola MC68HC11 Reference Manual (a.k.a., The Pink Book). That book is a bit hard to find now, but here's a link to a copy on a non-Motorola/Freescale site:

http://handyboard.com/techdocs/...echref.pdf

Please refer to Section 8 of that document. What is sometimes a little tricky using SPI hardware as opposed to bit-banging the signals to match the slave device's requirements, is getting the clock polarity (CPOL) and clock phase (CPHA) configured correctly. Some MCU vendors have different terminology and means for controlling polarity and phase.

If your slave device's datasheet refers to an SPI mode as 0, 1, 2, or 3, it is specifying what is essentially the binary CPOL/CPHA settings as defined in the Pink Book. If it only provides a timing diagram, you should be able to match that diagram with a timing diagram in the Pink Book. All of that is relevant if you are trying to match up so-called standards. Now, if your MCU vendor is using different terminology, you'll have to study how the SPI configuration options match up with your slave device and configure the SPI subsystem in your MCU-specific way, but at least you'll have some background knowledge of the SPI standard.

List of 8 messages in thread
TopicAuthorDate
ADC with SPI            01/01/70 00:00      
   What tell the datasheets?            01/01/70 00:00      
      It dosen't work in hardware            01/01/70 00:00      
         SPI standard            01/01/70 00:00      
         Which flags?            01/01/70 00:00      
         You mean the Simulator?            01/01/70 00:00      
         Try this            01/01/70 00:00      
   The MCP3208 data sheet to            01/01/70 00:00      

Back to Subject List