Driving Neopixels/WS2812/b/SK6812 using the SPI port…
(I’m thinking out loud and looking to be corrected on anything I say here)
Id like to be able to drive Neopixels on boards where doing so is restrictive because of different frameworks EG… Raspberry Pi, Orange Pi, Beaglebone, Nano Pi etc…
Lets say you have 2 pixels
2 x 3Bytes = 6 Bytes = 48Bits
If we set the SPI Frequency of 3,333,333(or close to) then each Bit takes 0.3us to transmit!
Each BIT is represented by 4SPI Bits eg…
1 = 2x1SPI bits + 2x0SPI bits
0 = 1x1SPI bits + 3x0SPI bits
We can then translate the 48bits of our 2 pixels into a new pattern using the above and transmit via the SPI port. Followed by a 80micro pause…
We only need the DATA(MOSI) pin of the SPI to be connected to the Neopixels DataIN pin…
Theoretically…will this work?