A SPI write command involves writing
data to a designated register while also reading the previous register data contents
on SDO (full-duplex).
- Drive /CS LOW. This enables the
internal shift register
- Shift 24 bits of data into the
device MSB first on SDI. Data must be stable during the rising edge of the clock
(SCLK).
- The MSB bit (B23) must be a “0”
to indicate this is a write operation.
- 16 bits of status is sent out on
SDO. The first 2 bits are 2’b11 (indicating this to be a status segment). The
next 6 bits B21-B16 are bits D5 to D0 of the Fault Status Register. The last 8
bits B15-B8 are all 0’s.
- The previous data in the register
is read on SDO (B7-B0) while a data byte is written into the register on SDI
(B7-B0).
- After the last bit of data is
transferred, drive SCLK low if there is no more data to be transferred.
- De-assert /CS (drive this high)
to end the write cycle