Page 1 of 1

Is it impossible to use TLC5955 with ESP32 specs?

Posted: Tue Jan 30, 2024 8:15 am
by maker2024
I would like to connect TLC5955 to ESP32 and light the LED with TLC5955.
However, an error occurs and the LED turns off automatically.
Is it because of the ESP32 specs? How can I improve it?

Use this Library in your Android IDE.
https://github.com/zackphillips/TLC5955


tlc5955 datasheet
https://www.ti.com/jp/lit/ds/symlink/tl ... 2FTLC5955

The Library settings were as follows.
TLC5955.h
#define GS_FREQUENCY 33000000 //33MHz from tlc5955 datasheet
TLC5955.cpp
analogWriteResolution(_gsclk, 8);

Run the code below to light up the LED.

Code: Select all

setup(){
 tlc.set_single_channel(0, 4095);
 tlc.update();
}
If everything goes well, it should stay lit until you run the code to turn it off.

The LED lights up, the error below occurs, and the LED turns off automatically in 3 seconds.

Code: Select all

E (1882) ledc: requested frequency and duty resolution can not be achieved, try reducing freq_hz or duty_resolution. div_param=0
#define GS_FREQUENCY 33000000
If you set this value to a lower value such as 1000000,
The error will no longer occur. However, the lighting frequency of the LED becomes too low, causing the LED to blink rapidly.

analogWriteResolution(_gsclk, 8);
If you set this value to 1, the error display will disappear and the LED will remain lit.
However, the LED current is 1.0mA, which is a very low output.

#define GS_FREQUENCY 33000000 //20MHz or higher to prevent LED from blinking
analogWriteResolution(_gsclk, 8); //A value of 2 or more is desired
Is it impossible to use ESP32 with this setting?
According to the error, it seems that ESP32 processing cannot be completed in time. So you can't use TLC5955?
I don't think that's the case.

I don't know much about ESP32, so I don't know what the problem with the ESP32 specs is that is causing this error.

Re: Is it impossible to use TLC5955 with ESP32 specs?

Posted: Wed Jan 31, 2024 2:29 am
by ESP_Sprite
The ESP32 LEDC should be able to generate frequencies up to 40MHz just fine... I'm wondering if it's possibly a bug in the library; could you try swapping these two lines and see if that makes a difference?

Re: Is it impossible to use TLC5955 with ESP32 specs?

Posted: Wed Jan 31, 2024 6:44 pm
by maker2024
Thank you for your reply.

Code: Select all

analogWriteFrequency(_gsclk, gsclk_frequency);
gsclk_frequency is the Library's default value of 2500000.
An error will occur with this value.
In the TLC5955 spec table, it is 33MHz.
If I set it to 1000000, the error disappears, but the working frequency of the LED is too slow and it blinks rapidly.

Code: Select all

analogWriteResolution(_gsclk, 8);
When this value is between 8 and 5, this error occurs. Even if it is brightly lit, it will turn off in about 3 seconds.
When this value is between 1 and 4, the error disappears. Continues to blink darkly and rapidly at 1mA.

Is 40MHz the PWM (LEDC) of ESP32?
I feel that the error is occurring because the ESP32 cannot process high-speed serial transmission to the TLC5955.

Re: Is it impossible to use TLC5955 with ESP32 specs?

Posted: Wed Jan 31, 2024 8:20 pm
by maker2024
When the brightness setting was 3, it was 15mA.
Setting the brightness setting to 7 will turn on the light at maximum brightness.
As usual, the following error occurs, so the light turns on and turns off automatically after about 3 seconds.

Code: Select all

E (1794) ledc: requested frequency and duty resolution can not be achieved, try reducing freq_hz or duty_resolution. div_param=0