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.
This commit is contained in:
Olivier Ortigues 2016-10-18 22:43:43 +02:00 committed by Damien George
parent 8ebd53afc9
commit bc4441afa7
1 changed files with 1 additions and 1 deletions

View File

@ -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