Go Down

Topic: WS2803 versus WS2801 (Read 17 times) previous topic - next topic

KirAsh4

Can someone explain to me how using the Adafruit library written for the WS2801 can work for the WS2803 as this person claims it does.

The data being sent isn't the same for them, the WS2801 is send 24 clock cycles while the WS2803 needs 144.  So are they modifying the library?  Since there is no contact info on that page, I can't ask them directly.

marklar

I would try to hook it up and let it fly, it should work.  I ran through the code and see nothing that would need to be changed in reference to the 144 clock cycles.  I put one of those on a breadboard and used on of my WS2801 controllers, unmodified, and it faded up and down a white LED.  That tells me that any code that talks to a WS2801 - should work for the WS2803 as well.  I do not have the time right now to download and that specific library .. but I'd give it a 90% chance of working unmodified. 

KirAsh4

#2
Jan 27, 2012, 08:38 pm Last Edit: Jan 27, 2012, 08:58 pm by KirAsh4 Reason: 1
That's the thing, it's doing diddly squat for me ...  However, I have a feeling it's not the library, it's me.  I tried Adafruit's library, I tried FastSPI, and I tried bit banging my way through it.  No dice.  (Well, bit banging had *some* results, but not what was expected.) So yeah ... I'm pretty sure I'm screwing up somewhere.

--- some elevator music later ---
Yep, as expected.  In my infinite wisdom, I was looking at an old circuit I had made with the WS2801, and hooking up the LEDs the same way on the WS2803.  However, I neglected to notice that I reversed the polarity on the WS2801 for the type of LEDs I was using then.  So they were all reversed on the WS2803. :)  Once I flipped them, things are working now.  :)

marklar

Great - congrats on getting it going :)  Nice chip. 

KirAsh4

It works great with the Adafruit's library, either in SPI mode or bit banging mode.  With FastSPI however, not so good.  Need to figure that part out.

The one thing I noticed, using Adafruit's library.  Assume you put the ports together in groups of 3 (representing 6 RGB LEDs).  When using the SPI interface, the individual channels come up one after the other, meaning the 3 red channels will visibly come on one at a time, same for the green, and blue.  Now, if I switch it to use two arbitrary pins for SDA and SCK, the individual channels come on at the same time.  Same time delay, the only thing changing is whether I'm using SPI, or two other pins.  It seems odd.  But at the same time, it has it's potential, having the channels come on one at a time like that.

Go Up