0
\$\begingroup\$

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?
\$\endgroup\$
  • \$\begingroup\$ It looks more about how to use the SPI controller for your CPU than the HI3593 itself. \$\endgroup\$ – TEMLIB May 8 '16 at 0:13
  • \$\begingroup\$ the answer is yes to both. \$\endgroup\$ – Jasen May 8 '16 at 12:35
1
\$\begingroup\$

SPI is logically a circular buffer - I mention this as you seem confused.

On page 14 of the datasheet (behind a script), it states:

In the general case, both master and slave simultaneously send and receive serial data (full duplex), per Figure 5 below. However the HI-3593 operates half duplex, maintaining high impedance on the SO output, except when actually transmitting serial data. When the HI-3593 is sending data on SO during read operations, activity on its SI input is ignored. Figures 6 and 7 show actual behavior for the HI-3593 SO output.

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.

HI-3593 during command

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.