ivan141
LQFP112 - Up with the play
Joined: Sat Sep 29, 2012 9:16 pm Posts: 148 Location: Rotterdam, the Netherlands
|
It's been forever since I last looked at this project and tried to figure out why I couldnt get it to work like expected. Yesterday I was going over the schematics and the datasheets of the WS2801/3 LED drivers and finally figured it out.
I use a combination of 4 WS2801 (single channel) and 3 WS2803 (6 channel) IC's in series on 1 SPI bus. In principle you just shift RGB data in for every channel on the bus, and the devices latch to their respective settings. What I did not pick up on is that both IC's use a different approach to passing data on and latching. The WS2801's latch on to the first data they receive, and only start to pass data through once they have latched. So the first 3 bytes sent are used by device nr 1, the next ones by device 2 and so on.
The WS2803 on the other hand passes all received input data directly through on it's output. It latches once you stop sending long enough. So the first bytes of data pushed in end up being used by the last device on the bus. As you can see, quite the opposite of the 2801.
This had me really stumped.. I just couldnt get the led's to switch in the order I expected. The order on the bus is 2801-2801-2801-2803-2803-2803-2801. That translates to the following RGB channels 1 - 2 - 3 - 4,5,6,7,8,9 - 10,11,12,13,14,15 - 16,17,18,19,20,21 - 22 In order to pass data down I think I need to send data in this order: 1, 2, 3, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4.
Will be digging the HW up out of the closet soon to try this out. By now it is only a matter of principle to see if I can get this monstrously labor intensive design to work. A year after I designed this WorldSemi came out with the WS2812B, which is an RGB pixel with inbuilt controller, so you can just chain your led's together on a bus. That would simplify the design and assembly of this thing by A LOT. But I'm not touching my PCB software until I do something usefull with the old board (besides learning from mistakes).
_________________ FABRICA MI DIEM, PVNC!
|
ivan141
LQFP112 - Up with the play
Joined: Sat Sep 29, 2012 9:16 pm Posts: 148 Location: Rotterdam, the Netherlands
|
I've also read that the control of 2812's is slower and more processor intensive (due to bit-banging), but until you've layed out a relatively small PCB with lots of LED's and a handful of these IC's you cant appreciate the hassle it is to get it all routed together. The 2812's can be chained together on the bus, and wired up to a power and ground plane... very tempting.
_________________ FABRICA MI DIEM, PVNC!
|