I am developing a product in which i have to use 5 LCDs. The LCD i am using does not contain CS pin. SO i had to use MUX for muxing of complete SPI bus from one LCD to other. But the issue i am facing is, LCD turn off display when i change the select lines of MUX to switch the SPI bus to other LCD. sometimes it just show white screen. basically switching the MUX put the LCD in trouble.

what i am thinking is that when i switch the BUS from one LCD to other then MUX may generate some random data during switching or something like that. so there is any way the before switching, i should put lcd in a mode that it should not update display until i send any special command again ?

All pins except RST are going through mux, i used separate GPIO for RST of every LCD so that RST should not have issues during switching.

Library i am using is TFT_eSPI.h Basically library do not support mulitple LCDs, so i customized it by just making global variable for reset pin, when i switch the mux to specific LCD then i change the values of RST to corresponding LCD.

My LCD link is https://megaeshop.pk/1-3-inch-ips-hd-tft-st7789-ic-unit-240-240-spi-communication-3-3v-voltage-spi-interface-full-color-lcd-oled-display.html

Controller is ESP32

MUX 74HC4051

purpose of using LCD without CS is related to pricing issues. LCDs with CS are too expensive.

I am sorry if my Question formating is not correct or i missed any information. pleas feel free to ask. I think on all the forums and articles, this is first time i am using multiple LCDs without CS :)

  • yes it without CS. that's why i used mulitplexer. when i have to write data on let's say LCD 2 then i simply change the address lines of multiplexer
    – faiz07
    Dec 26, 2020 at 5:20
  • i am sorry, i have updated the link.
    – faiz07
    Dec 27, 2020 at 16:09
  • Just guessing but try using some simple logic and keep the clock line in the non asserted state (depends on SPI mode), all the data bouncing around will have no effect, it has to be clocked in. I assume you are not actually reading data from the display.
    – Gil
    Dec 27, 2020 at 16:50
  • thanks for your comment, should i make clock pin as input of controller before switching the addresslines ? for now i am not reading anything from display.
    – faiz07
    Dec 28, 2020 at 17:14
  • Thanks for the update. I was just thinking later when reading you probably will have to mux the data out of the display and again it will only be valid with a clock. The reason for the mux is all of them will probably turn on at the same time causing bus contention.
    – Gil
    Dec 29, 2020 at 18:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.