Skip to content

chip select issue with multiple screens (ST7789) #124

Open
@BioRyajenka

Description

@BioRyajenka

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 #95 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions