MOD-LC2.8RTP with ESP32-EVB, turn off backlight?

Started by Swing, October 30, 2022, 12:02:34 AM

Previous topic - Next topic

Swing

Hi,

I am using the MOD-LC2.8RTP with the ESP32-EVB board with UEXT connector.
On the LCD board it says of the pinout that pin 3 is LCD BL which should mean backlight?
Can I turn this off?

From the ESP32-EVB board I saw that the UEXT pin 3 is connected to GPIO4 pin of ESP32, and I tried setting the GPIO pin 4 for output and setting it to LOW (also tried HIGH) but this did not affect the backlight at all.
And perhaps pin 3 and 4 are in use for touchscreen?

I also want to add DS18B20 sensors, which is done through GPIO4 in a lot of examples, but it seems I can use other pins for that (if they are not in use by the EVB board pheriphals)

Perhaps it is not possible to disable backlight or I'm doing it in the wrong way.

Thanks in advance

LubOlimex

I think there is software function in the LCD driver itself to control the back-light. The backlight is series of LEDs pins 46-50. Strat from "8.3.9." and onwards of the following document:

https://github.com/OLIMEX/MOD-LCD2.8RTP/raw/master/HARDWARE/DOCS/ILI9341V_v1.0.pdf

If you wish to use MOD-LCD2.8RTP with the ESP32-EVB - consider that you won't have a lot of pins left over and you can't use the SD card (since it is multiplexed with the SPI pins of the UEXT). The MOD-LCD2.8RTP uses at least 6 pins - 4 for the display and 2 for the touchscreen. You would be left over with 1-2 free pins on the UEXT.

Technical support and documentation manager at Olimex

LubOlimex

Technical support and documentation manager at Olimex

mihaiadrian

#3
Some commands [ like Backlight Control 8 (BFh) -  need the following: "EXTC should be high to enable this command" .

How can this be done on MOD-LC2.8RTP  ( EXTC to be high )  ?   I do not see a jumper or something easy to be done.
The outcome is to turn off completely back light.

I have modified class Adafruit_ILI9341 from Olimex example, and made this method public:
        void        writeCommand(uint8_t cmd);
        void        spiWrite(uint8_t v);
        uint8_t     spiRead(void);
After this, just sending that commands like this, have no effect :

  digitalWrite(TFT_CS, LOW);

  delay(120);
 
  tft->writeCommand(0x53);
  tft->spiWrite(0x1);
  tft->spiWrite(0x1);
  tft->spiWrite(0x1);

  delay(120);
 
  tft->writeCommand(0xBF);
  tft->spiWrite(0x1);
  tft->spiWrite(0x1);
  tft->spiWrite(0x1);

delay(120);

  tft->writeCommand(0x51);
  tft->spiWrite(0x0);  # no brightness

digitalWrite(TFT_CS, HIGH);




So, to summarise:
does MOD-LC2.8RTP allow turning off backlight / back led completely ? ( in order to save energy .... )
how can this be done ? Only from software or it requires hw modifications ? ( I assume there is some reason why some control function are private .... )

LubOlimex

#4
By default backlight is always on. However, this can be altered by changing the position of a PTH jumper and using an extra pin at the UEXT. The jumper in question is SJ2 and the pin that would then handle the backlight would be RX at the UEXT.

Look at the schematic, pin 50 is responsible for the backlight. By default position of jumper SJ2 it is always set to ground. However, if you change the position of the SJ2 PTH jumper (cut between the pads of original position to disconnect it, and solder the pads of the other position; use multimeter in circuit detection mode to determine whether successfully disconnected the original position), then you will connect the backlight pin to the RX wire. This means you can then control the backlight via the RX pin that is available at the UEXT in your code and board (by default RX pin is free anyway). When you want backlight to be on you need to set the pin to low position, when you want it to be disabled drive it high.
Technical support and documentation manager at Olimex

mihaiadrian

#5




Ok, thank you.
I identified the PIN50 and SJ2.  It is not visible in the image, but the 2 pads do look connected, so yes, I will try to cut and connect on the other position.

Further the RXD is connected to TX from  UEXT , so on ESP32-POE-ISO would be GPIO04  that needs to be made LOW or HIGH .  Very nice.  Will try.


LubOlimex

SJ2 pads are connected on PCB level (below surface). Like factory-connected (to look clear without extra soldering on top). So you have to cut between pads with something sharp and thin like a box cutter. Just be careful to cut just between the pads. After disconnecting the pads, test if the disconnect was successful with detection mode of multimeter tool. If you don't have such maybe test the board, the backlight should be off I guess. Then solder together the other two pads for the RX connection.
Technical support and documentation manager at Olimex

mihaiadrian

I confirm the solution discussed above is working. All good.