Having many data outs go through just one pin instead of many

Hello, so you know how a lcd 16x2 thats NOT an I2C board using many wires, and if you have more than one lcd your arduino board becomes stuffed with wires.
So what Im wondering how I would minimize the amounts of ports my arduino uses to I have the 4 ports open and ready for the SPI

So I have an online variant of what i kinda have built, and as you see having 4 different lcds take alot of space.

If you have any ideas or questions so I can figure this out that will be awesome.

also if there is a better spot to put this post, please tell me ill move it.

Welcome to the forum

To use 4 LCD screens each with an SPI interface requires 7 pins

MISO
MOSI
SCK
and an SS pin for each screen, if that is what you are asking

Not really sure what the question is.

If you have 4 LCD displays the only sensible thing is to use SPI or I2C backpack on the LCD.

1 Like

You can use up to 8 screens with I2C and a backpack for each LCD. That requires the same 4 wires which are SCL, SDA, +5, and Ground be run from display to display. Only 4 connections on the Arduino.

alright so you know how the I2C LCD only has four pins that take data in, instead of like 16 or so. I could get some I2C Displays but i would like to know if can do something similar to it...

thats not, but its good to know for later, anyways so you see how there are 4 yellow wires, they are the same for all lcds, is there a way for it to be dumbed down to one or two,

No. I mean if there was, why would people make I2C backpack?

for an easier way of doing it.

I should of done this earlier, there is no way of doing this, as the LiquidCrystal.h Library has no way of letting this happen, How ever there maybe a way for me to change what ports the SPI calls for. instead of 10-13

Why do you want to use other pins for SPI ?

I2C requires two pins: SDA and SCL. They are shared between all the displays. You will have to set them all to a different bus address (the I2C backpacks have solder jumpers for this), but then it's just two wires for all four displays.

An SPI backpack needs 7 pins total as mentioned above.

The SPI bus (MISO, MOSI and CLK) is hard wired to a specific set of pins, it's built into the MCU. You can use any digital I/O for the four CS lines.

More correctly, 4 SPI backpacks require a total of 7 pins

@spiritxiv it is very difficult to understand your questions and responses. Perhaps you should use your own language and use Google to translate it for us.

I will try to guess what you are asking.

A single 16x2 LCD, that does not have any kind of backpack, requires 6 Arduino digital pins to control it, one for each of these pins on the LCD: D7, D6, D5, D4, RS and EN.

If you wish to connect 4x LCD, the D7, D6, D5, D4 and RS pins of all 4 LCD can be connected to the same 5 Arduino pins. Only the EN pin from each LCD must be connected to a separate Arduino pin.

So for 4x LCD, 9 Arduino pins are needed.

By the way, the wiring diagram you posted would destroy your Uno.

1 Like

Not really, I2C is used to reduce the number of pins used.

Alright, well that makes sense,
However, could you by chance describe how it would destroy my Arduino?

You have a motor connected directly to an Arduino pin. A motor will draw enough current to damage an Arduino pin. And if it survives that, when the motor is switched off, the reverse current/voltage generated by the motor will damage the Arduino because there is no flyback diode.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.