I have yet to do a deep dive on the LPD8806 chip, but have on the WS2801, which is very similar. You generally push all the LEDS every time, usually in a big array. Each chip will pass data onto the next chip if there is no pause in the SPI signal. This all happens in a very short amount of time. Once you stop sending a signal for X amount of time (varies by chip type), the IC (all of them) then knows it’s done getting instructions and lights up the night. You can’t set color on an individual chip. You have to push all of them every time.
Your second sentence is correct. SPI is very fast. There is no mechanism to do that even if you wanted to in SPI, like you see in I2C.
You could easily write functions that generate cool patterns and add them to Dave’s class. I run my WS2801 strip on the original Panda and it’s plenty fast. These strips on a Cerb board should be smokin’ fast.
Running mine on the Cerbuino Bee, and it’s definitely fast, but seems to slow down as more LEDs are added. Is that to be expected? And is there any way to tweak the functions that generate the patterns to compensate?
When you were testing with the WS2801, what did you use for a power supply?
Well I have only one meter of the stuff, so 5V 1A is plenty. It makes sense that it would slow down as you add more LEDs - each refresh has to push more data, which takes a little longer. Do you have a logic analyzer? That would really let us know what’s going on for timing as the data is being pushed through all the ICs.
Also, I used a big array of this struct to keep track of my LEDs, and it noticeably bogged down when I put it into some nested loops to update colors. That was strictly due to how fast NETMF on the Panda handled the looping, and not a factor of how fast the WS2801 chips could push the data down the strip. I could make it go faster by unrolling the loops, but that quickly became a very tedious task, so I settled for “fast enough”
/// <summary>
/// Represents color data for one LED
/// </summary>
public struct RgbLed
{
readonly byte _red;
readonly byte _grn;
readonly byte _blu;
readonly int _pos;
/// <summary>
/// Constructor
/// </summary>
/// <param name="red">red color byte</param>
/// <param name="green">green color byte</param>
/// <param name="blue">blue color byte</param>
public RgbLed(byte red, byte green, byte blue)
{
_red = red;
_grn = green;
_blu = blue;
_pos = 0;
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="red">red color byte</param>
/// <param name="green">green color byte</param>
/// <param name="blue">blue color byte</param>
/// <param name="position">LED position on strip</param>
public RgbLed(byte red, byte green, byte blue, int position)
{
_red = red;
_grn = green;
_blu = blue;
_pos = position;
}
public byte Red
{ get { return _red; } }
public byte Green
{ get { return _grn; } }
public byte Blue
{ get { return _blu; } }
public int Position
{ get { return _pos; } }
}
@ ransomhall - So…bad news, good news.
Last week, while getting ready for day 1 of MADExpo (and having had way too little sleep), I was testing my blinkies to make sure they survived the trip down, and I accidentally plugged the ground from my FrankenPSU into the 3.3v on my Cerbuino Bee. Thankfully, I did not destroy the mainboard, but the LED strip did some rather interesting stuff, and subsequently refused to work (actually, the first 2 LEDs worked normally, and the second 2 were at full white, while the rest were completely dark).
LESSON LEARNED: Avoid doing hardware while tired. Too easy to miss a connection and toast something.
Thankfully, I still had my second reel of LEDs, so I was still able to run my demo. ![:slight_smile: :slight_smile:](//forums.ghielectronics.com/images/emoji/twitter/slight_smile.png?v=5)
Now for the good news.
Once I got home from MADExpo, I cut back the rubber sheath, cut out the first 4 LEDs at the solder pad break point, and soldered the leads/plug back on. As I had guessed, the remaining LEDs still work fine, so it appears that I just managed to fry one of the ICs.
So word to the wise…do be careful in how you wire these. They’re fairly robust, but running current through ground isn’t a great idea, as it turns out. ![:wink: :wink:](//forums.ghielectronics.com/images/emoji/twitter/wink.png?v=5)
Well, I’m glad a quick trim solved the problem. Adafruit sells the silicon end caps if you want to seal it back up again. Silicone Caps for Digital Addressable Strips - pack of 4 : ID 774 : $1.95 : Adafruit Industries, Unique & fun DIY electronics and kits . I’m a little skeptical about claims of waterproof-ness, though.
Thanks!
For now, I’ve used hot glue and electrical tape. Short of submerging them, I think that should be sufficient for now. ![:slight_smile: :slight_smile:](https://forums.ghielectronics.com/images/emoji/twitter/slight_smile.png?v=12)