3
\$\begingroup\$

I'm working on the SC18IS600 chip (SPI to I2C converter) and have been having issues just communicating with it. At the moment I am attempting to configure the I2C Address register and set it to 0x3F or 0x00. When reading the address back however, I am getting (afaik) gibberish - it's not even reading back the default address value. While testing I noticed that the CS line goes low much earlier than the clock signal and want to know if the CS line must be synchronous with the clock when using SPI, or if a delay like the below image is acceptable. If anyone has other suggestions as to why this might not be working, please feel free to make them.

Edit for explanation: The 'gibberish' I was receiving was a result of not allowing for an 8us gap between each data word. The SC18IS600 requires this gap, further explained here for anyone else: https://community.nxp.com/thread/461576

Image: yellow = MISO/rx, blue = MOSI/tx, pink = clk. Image taken while trying to read the address. Sorry for the image quality, it's a very old oscilloscope that can't save images anymore.yellow = MISO/rx, blue = MOSI/tx, pink = clk.

datasheet at https://www.nxp.com/docs/en/data-sheet/SC18IS600.pdf

\$\endgroup\$
3
  • \$\begingroup\$ Are you asking 2 questions? One seems to be about the CS line, the other about the SS line. \$\endgroup\$ – user105652 Jun 12 '20 at 4:05
  • \$\begingroup\$ @Sparky256 my understanding is that they are the same thing - chip select/slave select \$\endgroup\$ – eles Jun 12 '20 at 4:08
  • \$\begingroup\$ That is possible if config bits set that device to be in slave mode when active, thus CS acts to enable MISO and MOSI at least one setup time before SCLK. \$\endgroup\$ – user105652 Jun 12 '20 at 4:13
2
\$\begingroup\$

No, in fact there's usually a minimum time that the CS signal must be pulled high/low before you can start clocking in data.

From your datasheet (pg 19): enter image description here:

$$ t_{SPILEAD} $$ is the minimum time, in your chips case 4µs (datasheet pg 18). Make sure your transmission follows those timing requirements/transmission protocol.

\$\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.