Truly LCD front panel: the backlight

 Posted by:   Posted on:   Updated on:  2022-12-31T19:46:29Z

Control the backlight of the Truly LCD from SerComm SHG1500 router front panel using an Arduino library.

Here is the follow-up of the post where I described how I took out the front panel of a router (yes, a router) and found a way to interface it with Arduino or other development board. It should be noted that the front panel electronics use 3.3V levels, therefore the popular 5V Arduino boards cannot drive the front panel. Using level shifters would complicate things and increase the possibility of something going wrong, so I ended up using a 3.3V STM32 blue pill development board. This is programmed from Arduino IDE, so the code I write is compatible with Arduino development boards.

While I was sampling various pins of the front panel connector with a logic analyzer, I noticed a strange protocol on pin 18. I was able to trace the PCB track from pin 18 near an area that seemed like a DC-DC converter. It directly drove an integrated circuit marked T43. Searching for it revealed some LDO linear voltage regulators, but this was not the case. Pin 18 carried a digital protocol that would be of no use for an ordinary voltage regulator. But without information I could only write code that would mimic the protocol I sampled. Things changed once the GPL source code has been made public. The signal on pin 18 had a meaning. It was necessary to turn on/off and dim the backlight. Upon powering the front panel on the breadboard, the backlight stayed off. You can turn it on by setting pin 18 high but if you want to adjust its level you must send two bytes using a custom serial protocol. Before getting to the code let’s see an overview of the pins and connections on the breadboard.

Front panel connector adapter on breadboard
Front panel connector adapter on breadboard
The left side power lines supply 3.3V and the right side ones supply 5V. There are multiple ground connections. I don’t know if all are needed, but I connected all of them. The backlight control pin is on the left side (connected to the blue jumper wire).

The LED backlight driver is located in the bottom left corner of the front panel. Two tracks from that area of the PCB go to the display FPC connector (pin 37 seems to be cathode and 38 is anode).

Backlight controller IC T43 on Truly LCD PCB
Backlight controller IC T43 on Truly LCD PCB
Backlight protocol is a low speed serial bit stream. The driver delivers maximum LED intensity when control pin is pulled high. When pulled low, backlight is off. If you need anything else between off and full intensity, you must send the intensity level using this digital protocol. Then you can pull low pin 18 to turn off backlight. When you turn it back on by setting pin high, it maintains the previously set intensity. Power cycling or reset sequence clear previously set intensity.

The recommended sequence after power on is to reset the backlight then immediately send intensity bytes. In this way, backlight will turn on with the desired intensity. If you only send reset sequence or just set pin high, the intensity is not configured. However backlight will still turn on, with a high intensity (probably maximum).

Backlight protocol overview
Backlight protocol overview
As you can see from the above representation of the protocol, after the reset sequence, two bytes are sent. There is a start sequence where the line is pulled up for 50 us. Then each bit starts with the line low. Bit “0” starts with 200 us low time followed by 100 us high time while bit “1” has this timing reversed. It starts with 100 us low time followed by 200 us high time. The end of any bit transmission leaves line high, therefore a stop sequence is needed. The line is pulled low for 50 us to signal the end of a complete byte transmission. Then the cycle repeats and the second byte is sent. The stop sequence pulls the line back up, so the backlight will turn on with this just set intensity.

First byte is always 0x72. Probably this is some kind of address. Then the intensity value is sent. For this controller, values between 0 and 31 are accepted (0 to 0x1F). The Arduino compatible library I wrote should be used like this. All functions can be called both in setup() and loop(). But there is an order you must follow. First call setControlPin() passing the pin to this function. Do whatever you want while backlight is off (configure LCD). Then reset() the backlight and setIntensity(). Anywhere in the code to turn on or off the backlight use setOnOff(). To adjust intensity later on, there is no need to call reset() before. It doesn’t matter if backlight is off, setIntensity() will turn it on. So does reset().

The library is hosted on GitHub. Remember that although I used this with Truly LCDv6 front panel, maybe other hardware versions use this controller too. The other I have, FPGA LCDv3, doesn’t.

No comments :

Post a Comment

Please read the comments policy before publishing your comment.