Hi! I bought two 1.3" SPI Colour LCD (240x240) for use with my Raspberry Pi 3 B. I made the following connections:
Both Displays:
- 3-5V to any 5V or 3V pin
- SCK to BCM 11
- MOSI to BCM 10
- DC to BCM 9
- GND to any ground pin
Display 1:
Display 2:
When both Displays are connected Display 1 works but Display 2 shows no image. Is there a solution for the problem?
You also have to set them up individually in your code. Something like this.
disp1 = ST7789.ST7789(
port=0,
cs=1,
dc=9,
backlight=19,
rotation=90,
spi_speed_hz=80 * 1000 * 1000
)
disp2 = ST7789.ST7789(
port=0,
cs=0,
dc=9,
backlight=18,
rotation=90,
spi_speed_hz=80 * 1000 * 1000
)
# Initialize display.
disp1.begin()
# Initialize display.
disp2.begin()
And edit the code that is displaying info on the screen. For example.
disp.display(img) becomes disp1.display(img) or disp2.display(img)
I have a 3 lcd setup with the 0.96 160 x 80 and a dual setup with the same screen. Each display showing its own image / data.
I’ve done exactly that in Python. Even when I use a Script that only accesses Display 2 while Display 1 is connected no image is shown 🙁. When I disconnect Display 1 it works as it should.
Can you post your code? If you put three ` at the top and three more at the end it will put it in code tags. On my keyboard it the symbol under the ~ top left corner under the esc key and next to the 1 key.
I’m not sure if it matters or if its your issue but GPIO 7 is CS1 and GPIO 8 is CS0.
You have CS1 to display 1 and CS0 to display 2. I would have done it the other way around.
What I do is make one display, display 0 tied to CS0 and the second display 1 tied to CS1 and my third display is display 2 ties to CS2. It made my coding and keeping track of what display was what easier.
It works now! My code was correct, but I had to reduce the spi_speed_hz from 80 * 1000 * 1000 to 40 * 1000 * 1000 to get it working.
Weird, but whatever works. I’m just using what is listed in the examples for my 0.96 LCD breakouts. No issues even with 3 being used. Pi Zero
disp0 = ST7735.ST7735(
port=1,
cs=0,
dc=19,
# backlight=5,
rotation=90,
spi_speed_hz=10000000