Maybe it's not designed to work that way but I think that I've already done it and it's working, well... almost as I want.
For now i'm using Arduino Nano, one WS2803, one common cathode RGB LED and that piece of code:
#include "SPI.h"
#include "WS2803Single.h"
int counter = 0;
int rgbDelay = 800;
WS2803Single strip = WS2803Single(1);
void setup()
{
strip.begin();
strip.show();
DDRC = B00000111;
PORTC = B00000000;
}
void loop()
{
uint8_t red, green, blue;
SetColorToIndex(counter, &red, &green, &blue);
strip.setPixelColor(0, red);
PORTC = B00000100;
strip.show();
delayMicroseconds(rgbDelay);
strip.setPixelColor(0, green);
PORTC = B00000010;
strip.show();
delayMicroseconds(rgbDelay);
strip.setPixelColor(0, blue);
PORTC = B00000001;
strip.show();
delayMicroseconds(rgbDelay);
counter++;
counter = counter % 768;
}
static inline void SetColorToIndex(uint16_t color_index, uint8_t *r, uint8_t *g, uint8_t *b)
{
uint8_t group = color_index >> 8;
uint8_t value = (uint8_t)color_index;
switch (group)
{
case 0:
*r = 255 - value;
*g = value;
*b = 0;
break;
case 1:
*r = 0;
*g = 255 - value;
*b = value;
break;
case 2:
*r = value;
*g = 0;
*b = 255 - value;
break;
}
}
Colors are a little bit 'washed out' and it's flickering a little but it's working
I want to give it a try and connect all 18 RGB leds but I don't know if it's worth it.
TLC5940 works really great but I don't know how to get rid of transmission problems over long connection cables (I used MM74HC04M as buffers but that didn't work at all), unfortunately it's really easy to burn it.