PDA

View Full Version : Shiftout over I2C possible?



CuriousOne
- 23rd February 2023, 05:00
Hello.
I have PCF8574 I2C extender.
I want to connect to it's outputs APA102 LED (which is SPI)

Can PBP handle this, or I'll have to do manual bit forming over I2C bus, to have "proper" SPI at it's output pins?

Ioannis
- 23rd February 2023, 08:24
Won't all these slow down your data communication?

Ioannis

tumbleweed
- 23rd February 2023, 12:27
Won't all these slow down your data communication?

Boy. that's an understatement!

You'll have to do three I2C writes for each bit (set data, set clock high, set clock low).
It'll be as slow as molasses, but it'll work (as long as the APA102 isn't finicky about the SPI timing)

Obviously you can't use Shiftout to do it.

CuriousOne
- 23rd February 2023, 18:41
Yes it will be slow, but I have no issues with that, since APA102 will be used for static lighting and updated maybe once per day...