esp8266/espneopixel.c: Solve glitching LED issues with cpu at 80MHz.
At the WS2812 driver level, a 400ns value was used for T0H (time high to send a 0 bit) but LED specification says it should be 350ns +- 150ns. Due to loop overhead the 400ns value could lead to T0H close to 500ns which is too close from the limit value and gave glitches (bad data to pixels) in some cases. This patch makes the calculated T0H value 350ns.master
parent
8ebd53afc9
commit
bc4441afa7
|
@ -33,7 +33,7 @@ void /*ICACHE_RAM_ATTR*/ esp_neopixel_write(uint8_t pin, uint8_t *pixels, uint32
|
|||
#ifdef NEO_KHZ400
|
||||
if(is800KHz) {
|
||||
#endif
|
||||
time0 = fcpu / 2500000; // 0.4us
|
||||
time0 = fcpu / 2857143; // 0.35us
|
||||
time1 = fcpu / 1250000; // 0.8us
|
||||
period = fcpu / 800000; // 1.25us per bit
|
||||
#ifdef NEO_KHZ400
|
||||
|
|
Loading…
Reference in New Issue