Hi.
Started playing with 3.1 lib on a sam3x (due) board.
I’m adding some custom hardware (CPLD) to drive multiple strips and reduce CPU load, but before I do this I’m verifying the output using a logic analyzer and a ws2812b software decoder.
The driver is WS2812B which instantiates arm\sam\clockless_arm_sam.h.
So far so good, but I’ve noticed an odd issue which I’m still looking into. Just wondered if anybody else had come across it.
If I set up two LEDs like this :
leds[0] = CRGB(0x00,0x01,0x02);
leds[1] = CRGB(0xfd,0xfe,0xff);
Overall brightness is set to 255. No compensation etc so I would expect a 1:1 mapping to the output.
The analyzer, - and now prints in the driver - show some dithering behaviour which I would not expect to be there at max brightness - toggling between two states:
showRGBInternal p0 0 1 2
showRGBInternal p1 252 254 254
leds 4 scale r:$255 g:255 b:255
showRGBInternal p0 0 0 1
showRGBInternal p1 253 253 254
leds 4 scale r:$255 g:255 b:255
showRGBInternal p0 0 1 2
showRGBInternal p1 252 254 254
leds 4 scale r:$255 g:255 b:255
It looks like a 255/256 scaling issue perhaps? I’ll chase it more this evening.
Thanks for a super lib, very easy to get started with it.
Cheers,
Mike