adafruit / adafruit/Adafruit_CircuitPython_RGB_Display

chip select issue with multiple screens (ST7789)

Open
#124 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
143
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Hello!

I have two ST7789 lcds sharing the same SPI bus and I can draw on one or another screen but not on both at the same time (specifically, after I create another ST7789 object, previous one stops working).

Here is my code
```python
display1 = ST7789(spi, rotation=0, width=240, height=240, x_offset=0, y_offset=80, baudrate=BAUDRATE,
cs=cs1_pin,
dc=dc_pin,
rst=rs_pin)
display1.fill(color565(255, 0, 0))
time.sleep(2)
display2 = ST7789(spi, rotation=0, width=240, height=240, x_offset=0, y_offset=80, baudrate=BAUDRATE,
cs=cs2_pin,
dc=dc_pin,
rst=rs_pin)
display2.fill(color565(0, 255, 0))
```
When I run this code, the first screen displays red (actually, yellow. I think its because both CS are enabled by default until I initialized driver?), then after 2 sec **the first screen goes black** and then the second screen shows green.
I am willing to have something drawn on both screens at the same time, and not just on one or another?

_Originally posted by @BioRyajenka in https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/issues/95#issuecomment-2003323429_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.