I've developed a project using am ILI9341, ESP12F and Arduino. Everything works fine except a very annoying issue. The LCD flickers when I use the laptop's USB. But when I use a USB charger it's much better.

I use https://github.com/Bodmer/TFT_eSPI library for SPI driver and AMS1117 as regulator (with 1uf in the input, and 10uf in output).

I don't think the software has a problem because I don't refresh anything on the display (just draw something in the setup function, not in loop) and also it changes with different power sources. The problem is the backlight.

When I move the USB cable it goes crazier sometimes. I've checked it with many different cables and computers. Is this because of noise or something from the USB port? How can I fix this?

It's very important for me to be able to use the USB port as the power source.


When I'm uploading the code to the ESP8266 (using TXD & RXI), the LCD doesn't flicker event a little bit! And immediately after finishing the upload, the LCD brightness decreases and starts flickering!

The circuit is pretty simple and LCD pins are connected directly as listed here

  • 2
    Is it the backlight that flickers, or the TFT display?
    – Gerben
    Feb 15, 2018 at 16:05
  • Just backlight, no problem with display Feb 16, 2018 at 8:08
  • Try adding a capacitor between Vcc and gnd, near the display.
    – Gerben
    Feb 16, 2018 at 11:58

3 Answers 3


That happens because not all USB ports can supply more than 500mA of current. When you use a charger's USB port, it is designed to provide more than 500mA of current(ex. 1-2amps in most chargers). Try using a USB port that can provide more than 500mA of current. Most PCs and Laptops will only supply 500mA at maximum unless specified so.

More information regarding USB power can be read here on Wikipedia.


  • I don't have anything except an ili9341 & ESP12. Is it normal to need this much power! Feb 16, 2018 at 9:07
  • Maybe there is a fault with your board. try to measure its current from the USB input using a multimeter. Be sure to put your multimeter in >500mA Mode to not damage it(the multimeter ^_^ ) Adding also a capacitor between the supply and ground may solve the problem also
    – EngrAbbas
    Feb 16, 2018 at 13:21

I solve the problem controlling the frecuency of refresh with the led pin. With a timer of 10ms disappears flickering

  • I'd vote this up if I understood it and it looked like it addressed the question, but it's not really clear that it does. Did your controlling of the frequency of refresh solve a problem that had to do with how your project was powered like the poster had?
    – timemage
    Feb 22, 2021 at 14:49

I fixed this issue finally. The USB could supply both ESP and ILI9341, but the regulator could not. AMS1117 is not able to handle both EPS and ILI9341, we could connect ILI9341 directly to v5 (which it's not good and it would be hot!) or we can use another cheap regulator like XC6206P332MR just for the LCD.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.