Getting an ST7789 display to run on ESP32 Cam in Micropython

assadollahi
Posts: 1
Joined: Sat Jun 24, 2023 3:47 pm

Getting an ST7789 display to run on ESP32 Cam in Micropython

Postby assadollahi » Sat Jun 24, 2023 3:50 pm

I'm trying to get a display (ST7789, 320x240) to run on a ESP32 Cam in Micropython. However, I don't exactly know how to wire it. Attached you'll find how I did it, together with the code / driver from here: https://github.com/devbis/st7789py_mpy/tree/master There's a new library / driver here: https://github.com/russhughes/st7789_mpy but I wasn't able to find out how to specify the pins used. This is the display, btw: https://www.dfrobot.com/product-2071.html Any hints what to do?
Attachments
Screenshot from 2023-06-24 17-35-23.png
Screenshot from 2023-06-24 17-35-23.png (84.02 KiB) Viewed 2313 times

Agree007
Posts: 103
Joined: Mon Sep 18, 2017 7:11 pm
Location: Copenhagen

Re: Getting an ST7789 display to run on ESP32 Cam in Micropython

Postby Agree007 » Sun Jun 25, 2023 12:02 pm

What esp32 cam do you have ? Most of them dont have the free pins required for the display ?

nochkin
Posts: 8
Joined: Tue Jun 20, 2023 5:04 am

Re: Getting an ST7789 display to run on ESP32 Cam in Micropython

Postby nochkin » Tue Jun 27, 2023 4:13 pm

Like mentioned before, each ESP32 module is different. Some don't even have GPIO available to wire anything to it.
The ST7789 display needs at least 3 GPIOs available (MISO, MOSI, SCLK). You can put CS low if you have SPI bus dedicated to that display only. In some cases you may drop MISO since most displays don't really need to talk back to MCU.
The display board has MISO, MOSI, SCLK and CS easy available. You may need to put SDCS high if it's not using pull-up internally, that will disable SD interface to talk on the same bus.

Who is online

Users browsing this forum: No registered users and 126 guests