Arduino spi to i2c bridge?

Hello, I was wondering there there was a way to make an SPI to i2c bridge?

The reason why I’m asking if this can be done is because I don’t have any SPI pins they are being used really I don’t have any pins at all besides the i2c pins and I have a SPI lcd I would like to use.

Joseph

What are the SPI pins used for? You know that SPI is a bus like I2C so there can be multiple devices on the SPI bus as long as each device has its own chip select pin?

Hello, the pins current at the moment are being to control fans and two leds. Because I don’t have any spare pins besides a3, a4 and a5? The fans are on D10 and D11.

Joseph

Those analog pins are really digital pins with analog input as a special function. Use 2 of the analog inputs in digital mode for the fans. What is connected to pins 12 and 13?

Power push button and reset button for pc. But I can move them. I have 1analog and 1 digital pin free.

Joseph

On the other pins I have other things like rgb leds and 2pin leds, fan controlling as well as temperature sensors but nothing on the i2c pins.

Joseph

What is the SPI device?

It is hard to give any advice without knowing the particulars of the project. A detailed schematic would help a lot so we know, exactly, what parts that you are using and how they are connected.

If you can't get enough pins, I would suggest a port expander like the MCP23008 (I2C, 8 bit), MCP23S08 (SPI, 8 bit) or MCP23017 (I2C, 16 bit), MCP23S17 (SPI, 16 bit) to add digital pins. Then move things around to free up the SPI pins and the pins that the display needs.

Is SPI a Bus or a Port?

Oh I’m sorry I forgot to add that I’m there. It is a 0.96 lcd display that is spi.

Joseph

I would say that both SPI and I2C are buses as they connect several devices to the same set of pins. A port like a RS323 UART serial port. The port is meant for a 1 to 1 connection. Whereas RS485 serial or Dallas One Wire is a bus, several devices connect to the same 2 wires.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.