I am having some problem understanding half duplex SPI. My understanding of SPI is when you send a byte you read the garbage byte, and if you want to read a value you send a dummy byte to read the value. But for the Holtic HI-3593 chip, this is what it says:
For the HI-3593, each SPI read or write operation begins with an 8-bit
command byte transferred from the host to the device after assertion
of \$\small\overline{CS}\$. Since HI-3593 command byte reception is
half-duplex, the host discards the dummy byte it receives while
serially transmitting the command byte.
My questions are:
- Do I need to have an explicit command to read the dummy/garbage byte or is it taken care of?
- To read a value, do I need to send a dummy byte?
Best Answer
SPI is logically a circular buffer - I mention this as you seem confused.
On page 14 of the datasheet (behind a script), it states:
This is not unusual at all (and just about every Holt device I have used that has SPI does this); During command transmit, the SO pin will not be driven at all (the slave SO pin is High-Z); i.e. there is no meaningful data at the host receive pin.
This expands on a comment; to read data, operate the clock normally; and data on SI at the HI-3593 is ignored.