St7789 1.54 LCD Breakout & ExplorerHatPro

Hi, sorry me again. šŸ‘‰ šŸ‘ˆ šŸ˜”

I did do a quick search, but couldnā€™t find anything recent or relevantā€¦

Iā€™ve been trying to use the 1.54 LCD (st7789) breakout, with an explorer hat pro. And a SPI breakout garden extender. Sounds simple enough? Right? Well, no, not really. šŸ˜•

I can find 3-5V, GND, CS, SCK, MOSI, without issue on the explorer hat pro. And connect them up with my piratically approved jumper jerky just fine.

I believe that the ā€œDCā€ as labelled on the LCD BO is the MISO. But then I am left with the mysteries of the ā€œBLā€ connection.

If I drop the LCD into a SPI slot on one of my breakout gardens, everything works just fine. And there was much rejoicing.

I have one of the SPI OLEDā€™s which works okay on the explorer hat pro. Using ā€œDCā€ as the MISO. But the 1.54 LCD, doesnā€™t function, with the same connections. Guessing that this enigmatic ā€œBLā€ is possibly for colour information?

Looking at this image from the website, thereā€™s a different label for the ā€œBLā€ which is labelled GPIO.

So my support request is: How can I connect the LCD breakout to by explorer hat pro, so that when I use the command python3 image.py cat.jpg square the little kitty appears on my display?

Iā€™ve looked up various things including the Pi Foundation pages and pinout.xyz too no avail. Hence posting here.

Thanks for any guidance, mucho appreciated. Arrr, Yarr, and so on. šŸ‘

BL is the Backlight Pin. Grounding it should turn the backlight off, and if left unconnected the backlight should be on.
To make the example work you either have to wire the display up to match the pins used in the example. Or edit the example to match how you have the display wired.
Typically the examples use SPI 0 and either CE0 or CE1 for the CS (chip select)

SPI0
GPIO 7, Pin 26, CE1
GPIO 8, Pin 24, CE0
GPIO 9, Pin 21, MISO << DC
GPIO 10, Pin 19, MOSI
GPIO 11, Pin 23, SCLK

SPI1
GPIO 16, Pin 36, CE2
GPIO 17, Pin 11, CE1
GPIO 18, Pin 12, CE0
GPIO 19, Pin 35, MISO
GPIO 20, Pin 38, MOSI
GPIO 21, Pin 40, SCLK

/boot/config.txt

dtparam=spi=on

dtoverlay=spi1-1cs #1 chip select
dtoverlay=spi1-2cs #2 chip select
dtoverlay=spi1-3cs #3 chip select

SCLK - Serial ClocK
CE - Chip Enable (often called Chip Select)
MOSI - Master Out Slave In
MISO - Master In Slave Out
MOMI - Master Out Master In

Thanks alpha. As informative as always :)

Iā€™ve tried your suggestions, which sadly didnā€™t work. This is most likely on my part, not yours.

To get around this niggling issue, I have deployed the old screwdriver, had a good old fashioned swap about of piā€™s and hats. Until I have more free time to get my head into overlays, etc.

Like the new version of your project, btw. I hope you will enjoy it.

The pinout doesnā€™t list those pins. I guess because they arenā€™t directly used by the Hat?
I would think they go to SPI0. Then try CE0 for CS, and if that doesnā€™t work try CE1.
Your using the st7789 driver right?

Aye, using the st7789 driver from the Pimoroni github, here.

To be fair the ExplorerHatPro is a venerable Pimoroni product. The TODO.md is 7 years old now. Many of the examples are no longer functioning ā€œstraight out of the packetā€ so to speak. Needed much juggling with the code to even get them to run, without errors. I went for that hat for stuff like this. (flashing lights warning) I bought the ExplorerHatPro to use with another Pi. Due to supply issues, and that stupid real life thing we all have to contend with.

Iā€™ve taken the less preferred solution, of redeploying hardware, and getting my wallet out again for another breakout garden, sooner than planned. šŸ¤Ø

Iā€™m in the process of moving, so tinker time with Piā€™s is sparse. I didnā€™t understand why it wasnā€™t working. Which you have cleared up. Thanks again. šŸ‘

I have a ton of Breakout garden stuff on the go here, Pi and Pico. st7789 displays in just about every one of them. Being able to swap the breakouts between the two (Pi and Pico) makes life so much easier. I even resorted to making up my own BG SPI Mini Hat with the displays side by side instead of one behind the other. Iā€™m fussy that way, lol.

Glad to help, I enjoy a good challenge, especially when its not my challenge. ;) :P

1 Like