OK, I got a weird problem and I’m surely missing something. Maybe I’m still high from my trip at Amsterdam.
Here my setup:
The latest SDK
A cerberus with latest firmware
A ENC28 module on the pin 6
An extender on pin 5 with the LPD8806 led strip.
My program get some information from the WebServer, and send what to switch on/off to the led strip.
I tested, the web server works good.
But the led strip is totally out of control.
First, when I initialize it, I switch off the led. And it’s always all white and always switch on.
I checked with 4 differents code source, all with different implementation. All the same.
So, I tried my code deleting all the ethernet part, and removing the ENC28 module.
And it works. Almost. After almost one second I got the 4 first led in white.
So, I see 2 problems :
Why the ethernet module disturb the led strip writes ? I remember Gus talking about a bad design with pin 5 and 6, but I’m not sure it’s related.
Why after a little time, I got the first leds switch on ? I checked my code, I never write something. Do I need to always writes a array of zero values ?
Those led strips don’t have a chip select pin so you cannot share them on a spi bus, they need exclusive access.
if you want to plug in other devices on the same spi bus like the ethernet you need to add a chip select circuit to the led strip. You do this by adding the and gate to mimic a chip select.
The answer is in the text you quoted - if you want to SHARE access to the SPI bus, you need a CS. So if you don’t want to SHARE access, you don’t need a CS.
@ Justin - Haaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ok, now I understand. So I learnt something very interesting.
So for what I understand (sorry if it’s a recurring topic), socket 5 and 6 share the same SPI, and the led strip is receiving signals from the enc28 module, am I right ?
OK I got some reading with Google, now it’s more clear.
Does a “single input and gate” enough for me ? (the model 741G08 said wikipedia)
I’m looking the one @ Justin gave but I don’t find it in shop where I live… I thought I could get one this WE… snif…
I thought a 741G08 is a single AND gate with two inputs?? An AND gate technically has to have two inputs.
If you want it this weekend, what can you get ? What shops do you have access to? Remember that a logic gate like this just has a truth table based on it’s inputs, so you can find ways to achieve the same thing if you want… NAND gates are awesome for doing this. NAND logic - Wikipedia shows how to generate different equivalent circuits with NAND.