[RESOLVED] Understanding SPI - LSB or MSB?
Mightor
Posts: 338
Hey there,
I recently bought two digital pot meters (click here for datasheet). It uses SPI to change its wiper setting. However, I have never used SPI before so I am having some trouble understanding the timing diagrams in the datasheet. I have cut out two of the timing diagrams for your viewing pleasure. What I'd like to know is how I could tell from this diagram if it is MSB or LSB? I can see a "MSB in" on diagram 1.1, but I can't tell whether that is supposed to go in first or not.
Thanks,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
| I'm afraid I might be phobophobic.
Post Edited (Mightor) : 9/9/2007 11:49:12 AM GMT
I recently bought two digital pot meters (click here for datasheet). It uses SPI to change its wiper setting. However, I have never used SPI before so I am having some trouble understanding the timing diagrams in the datasheet. I have cut out two of the timing diagrams for your viewing pleasure. What I'd like to know is how I could tell from this diagram if it is MSB or LSB? I can see a "MSB in" on diagram 1.1, but I can't tell whether that is supposed to go in first or not.
Thanks,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
| I'm afraid I might be phobophobic.
Post Edited (Mightor) : 9/9/2007 11:49:12 AM GMT
Comments
I think you will notice MSB on the left, which is Most Significant Bit in.
Products vary and you will have to look at a lot of these diagrams to determine the exact product protocol. It does get easier once you have learned on.
One thing I greatly dislike is the MSB can be read as either Most Significant Bit or Most Significant Byte. In some texts, this can cause confusion because you have serial transmissions of multiple bytes.
I usually write MSByte, LSByte, MSBit, or LSBit for clarity.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
Thanks again,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
| I'm afraid I might be phobophobic.
Jeff T.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
| I'm afraid I might be phobophobic.