Shop OBEX P1 Docs P2 Docs Learn Events
[RESOLVED] Understanding SPI - LSB or MSB? — Parallax Forums

[RESOLVED] Understanding SPI - LSB or MSB?

MightorMightor Posts: 338
edited 2007-09-09 19:40 in General Discussion
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

attachment.php?attachmentid=49195

attachment.php?attachmentid=49196

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| 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
611 x 302 - 18K
611 x 326 - 42K

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2007-09-09 11:32
    These read from left to right.
    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)········
    ···················· Tropically,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • MightorMightor Posts: 338
    edited 2007-09-09 11:46
    Ah thanks! I was a little confused as to how to read these diagrams. You've cleared it up nicely!

    Thanks again,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | To know recursion, you must first know recursion.
    | I'm afraid I might be phobophobic.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-09-09 18:26
    Nice to see resolved added to the subject line

    Jeff T.
  • MightorMightor Posts: 338
    edited 2007-09-09 19:40
    Yeah, I noticed it being used a lot in the VB Forums. I suggested to make it a single button action on the forum interface but that never happened. I think it is a nice way for people who spend a lot of their time answering technical questions to avoid reading the ones that are already dealt with.

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | To know recursion, you must first know recursion.
    | I'm afraid I might be phobophobic.
Sign In or Register to comment.