DeqingSun / ch55xduino

An Arduino-like programming API for the CH55X
GNU Lesser General Public License v2.1
449 stars 87 forks source link

Is there any issue on WS2812? #31

Closed yanbwang closed 3 years ago

yanbwang commented 3 years ago

Hi,

I'm using WS2812B-Mini now.

The datasheet is below

https://atta.szlcsc.com/upload/public/pdf/source/20190620/C114583_ECCAEB884D1CBA01F5696FFC90F90D84.pdf

I find there is something wrong with Blue color. Eg. I set RGB as 00,00,FF, the color is Red+Blue.

And I also noticed you have remove the example file of WS2812 in your code.

Could you tell me why? Have you found some issue in your WS2812 library?

Thanks.

Z.t

DeqingSun commented 3 years ago

I didn't remove the example. It is still on https://github.com/DeqingSun/ch55xduino/blob/ch55xduino/ch55xduino/ch55x/libraries/WS2812/examples/chaseTest/chaseTest.ino

I've tested on my WS2812 and it worked well. If doesn't work on your side. Would you mind providing more sample of the wrong color?

yanbwang commented 3 years ago

Hi,

Yes, I can see your WS2812 code now. I don't know why the ZIP I downloaded didn't have this demo code.

I will study it tonight.

Thanks,

Z.t

yanbwang commented 3 years ago

Hi,

I have fixed this issue. It's caused by the time requirement is different from the one in library.

  WS2812D-F8 | WS2812B-Mini T0H | 400±150ns | 300±80ns T0L | 850±150ns | 790±210ns T1H | 850±150ns | 790±210ns T1L | 400±150ns | 790±210ns RES | >50us | >280us

After I change the data transfter time as the one of WS2812B-Mini, it works well.

Thanks a lot for your works.

Z.t

buttim commented 1 year ago

How did you change the timing? It seems the only possibility here is changing the number of nops in the code. I have some issues with the last of 16 LEDs. The last LED always has blue unchanged (stays off if it's off, on if it is on).

DeqingSun commented 1 year ago

@buttim if you see a lot of nop, you should update the CH55xduino Now you can change WS2812_DELAY

buttim commented 1 year ago

That's really good news. How comes I can't see the possibility to upgrade from the IDE?

buttim commented 1 year ago

Did not add the URL in settings actually

buttim commented 1 year ago

Version 0.20 has no problem at all, did not even have to change the timings. Thanks a lot