Tft display working, but not the backlight

Hi. Relatively new here, getting my bearings with forum content. I posted this question at the end of an old topic, but thought I’d try a new topic to see if anyone can help.

I’m putting together my own controller and display hardware. Running on a RPi 400 with a USB audio interface, I have an MCP23017 connecting the encoders and switches, and an ILI9341-based tft display.

The controller hardware is working. And, the display is generally working. There are pull-up resistors on the display backlight, so it’s on by default. However, when I connect the backlight pin to the RPi, the screen goes dark (making me believe the backlight pin is low). I’m using the rpi-display setting and overriding the backlight pin (the default had a compatibility problem with the audio (?)). Here’s the WebConf string I’m using:

dtoverlay=rpi-display,speed=16000000,rotate=270,backlight=12

Does anyone have an idea why the backlight isn’t working? Or, do I just misunderstand how it’s supposed to work?

Thx!

What are you expecting the behaviour to be?

Good question. I think the RPi backlight pin is active high. So, I was expecting that pin to be high which would turn the backlight on. Instead, it’s low which turns the backlight off.

Indeed but what do you want to do? Doesn’t the backlight come on when the Zynthian powers up and go off when the Zynthian powers down by stint of it getting powered by the Zynthian?

As I build my hardware, I want it to be as general as possible so I can use it in applications other than Zynthian.

I have a fair amount of experience developing with TFT displays controlled by microcontroller dev boards, but not in Linux. I typically use backlight control and PWM – e.g. keeping the backlight off until there’s something on the screen to avoid looking at the bright white startup screen, or fading between large screen transitions.

Anyway, when I looked at the RaspberryPi and Zynthian, I noticed that the rpi-display DTOverlay defined a backlight pin. As I first mentioned, I expected minimal support for that through the OS. Namely, that it would be high at some point to turn the backlight on. That would mean I could connect the backlight pin on my display so that if I did any of my own development, backlight control would be possible.

But, I think that’s not what happens. My guess now is that the OS sets the backlight line low until an application changes it. If that’s true, I can think of good reasons for that behavior. But, it means I have to design the hardware to be configurable depending on whether an app supports the backlight…or, live with no backlight control.

So, that’s the story. But, as you’ve pointed out, the hard-wired backlight works with Zynthian. And, that achieves the immediate goal of making sound. :slight_smile:

So lets hear it ! House rules, as ever apply…

1 Like