Adafruit_CircuitPython_RGB_Display
Adafruit_CircuitPython_RGB_Display copied to clipboard
chip select issue with multiple screens (ST7789)
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
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