Fundamentals/SPI/A whole conversation
Chapter · SPI

A whole conversation

The four clock modes, a full transaction from the light going on to the light going off, how fast it can go, and several devices on one bus.

  1. 07Modes4 minMode 0 is the default and most chips accept it, so you rarely choose a mode. You meet the four SPI modes when a datasheet asks for another, or when a chip answers but its bytes arrive shifted. Check the mode first.
  2. 08A transaction4 minA whole SPI conversation lives between chip select falling and chip select rising. To read a register you send a command and an address, then clock out bytes that carry nothing while the peripheral fills them in.
  3. 09How fast4 minSPI has no speed of its own. The controller picks a clock for each peripheral, and the ceiling is whichever is slower, the peripheral or the controller's pins.
  4. 10More than one device4 minPeripherals share the clock and the two data wires, and each gets a chip select of its own. A daisy chain saves the pins by threading them into one long shift register, and pays for it in clocks.

Start at 07 and read down — the order is the order things get easier in. Or take the one with your part in it; every article stands on its own, and links back to whatever it needs.