SPI or I2C? Digital pots and display controllers

I'm working on a project that will use multiple digital pots as well as a single display controller. I'm considering the MAX6955 or MAX6954, the difference being they run either on I2C or SPI.

I already have digital pots going over SPI, so is it possible to easily control multiple things over SPI? Is there a reason SPI or I2C would be better for a display controller on Arduino? Or would there be one that is preferred for interfacing with digital pots?

SPI needs a slave select line for each device. So adding another device takes another pin. I2C doesn’t. You can have up to 119 devices on I2C. However I2C is slower than SPI.

I would be inclined to use SPI for the display, since you probably want that to refresh quickly, and I2C for the pots, as you might have a few of them.

I can spare another pin (I'm using a Mega), so I think I'll go the SPI route.

For the digital pots, which would you say is easier as far as coding goes (less lines of code), I2C or SPI? Do you know of any good libraries for either one where you can include them and write to the pots with just a couple lines of code?

They both have good libraries. In each case you can use two or three lines of code to achieve what you want. Both come with the core installation.

For some reason I fumbled with the SPI library for quite some time and couldn’t get it to work. Then I went a more complicated route without the library and got it working right away. :~ Perhaps I’ll give it another try.

Thanks for that!