1
\$\begingroup\$

I am working on FPGA project where I have to configure the onboard ICs with SPI interface specified in their datasheets and few with the I2C interface. I was wondering that, is it possible to bring these SPI interfaces ICs as well on I2C interface? I'll permanently enable the Latch Enable pin to Logic '1'(VCC) and use the SCLK and SDATA pins interface for I2C interface pins because those 2 pins only what I need! Later My HDL protocol logic will take care of it inside the FPGA.

I'm exploring this first time so, Have anyone tried it earlier with these industry standard protocols? Is it even feasible? Especially when the product datasheet tells me that it has SPI and not I2C?

\$\endgroup\$
  • \$\begingroup\$ The SPI devices should not respond to anything that happens when they are not selected. The problem is will the I2C devices respond to an SPI transaction. \$\endgroup\$ – The Photon Jul 19 '18 at 5:05
3
\$\begingroup\$

I would suggest something like this instead if you can change your design slightly: https://www.nxp.com/docs/en/data-sheet/SC18IS602B.pdf

This is an I2C-SPI bridge. It responds to I2C transactions to a particular address and will perform SPI transactions in response. You would hang this off your I2C bus and have it be the master of your SPI bus. It has 4 slave-select outputs.

For going the other way around (hanging all the I2C devices off an SPI interface) there's this one: https://www.nxp.com/docs/en/data-sheet/SC18IS600.pdf

It is an SPI-I2C bridge. I think if you're doing an FPGA this would actually be the easier one to do, since then you don't need to worry about open-drain (especially combined with the necessary clock stretching logic) with the FPGA. Generally SPI interfaces are easier to properly implement on FPGAs.

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