How to write to an LCD that is connected to I2C slave?

I have an I2C master (Uno) successfully communicating with an I2C slave (Pro-mini). The Pro-mini has the LCD mounted. The actual data to display on the LCD is originated on the master (Uno).
Is this possible at all? Can the Pro-mini be slave (wrt. the Uno) and master (wrt. the LCD) at the same time?
And if yes: Should I pass every single character to display over I2C from Uno to pro-mini to display it there? Or are there better ways to do this?

Surely it is simpler to have Uno = Master
Slave#1 = I2C backpack
Slave#2 = Pro-mini

1 Like

Yes you can do that but it will get very convoluted. david_prentice gave you a good suggestion, if that is not possible let us know why. Posting a schematic not a frizzy thing would be a big help in solving your delima.

What is a "frizzy thing" ?
What is "wrong" ?

Reading #1 again implies that the LCD is actually a 4-bit parallel 16x2 connected to the Pro-Mini GPIO port(s).

The Pro-Mini is acting as a Slave to the Uno Master.
It could respond to several I2C addresses e.g. 0x3C for LCD, 0x20 for Voltage Sensor, 0x21 for Temperature Sensor, ...

I made an intelligent I2C backpack with an ATtiny2313.
The 2313 receives commands on the I2C bus. It displays data on the 16x2 connected to the 2313 Port pins.

The Uno Master uses the hd44780 library I2C driver.

However it is probably easier to just buy a PCF8574 backpack and connect that to the I2C bus. i.e. it uses existing library, requires no Slave programming or firmware.


So the question is - why do you have two Arduinos? An !²C "backpack" will drive the display perfectly well, coded from the initial UNO (but why would you use a UNO anyway instead of the more practical Nano?) with much simpler coding than trying to interface between two Arduinos?.

The I2C backpacks are cheap and easy to use:

Recommended solution...



Does the Pro-Mini do anything else apart form driving the LCD?
Is the LCD I2C as well?

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom.... :grinning: :+1: :coffee: :australia:

I have no Fritz drawing yet, just thinking about the possible options.
The Uno is fixed on a production PCB that we need to test on application logic and SMD soldering quality.
In a testbench, it will be connecting with pogo-pins to a test PCB on which the pro-mini is fixed. A testprogram will run on the Uno, and will instruct the pro-mini to return some analog measurement results using I2C. Test results must be visualized on an LCD.
In the final setup, the production PCB will carry the LCD but since it's not there yet during testing (the THT components will only be soldered after testing), I wanted to connect the LCD to the pro-mini. Hence my question.
It seems the I2C backpack is the perfect solution for this.

Well, clearly and the first Arduino, the UNO can control it via !²C, but what is the necessity for a second Arduino - a Pro Mini? What analog measurement does it make that cannot be made by the UNO itself?

And why are you using UNOs at all? For a "production" system, a Nano is more appropriate.

In fact, I have used a UNO for the sake of experimenting. In real life, it will be an ATMega2560, since we need lots of I/O pins and we have only very few left.
We have several analog voltages to measure on the production PCB where the ATMega will reside.
This must be done independently from the original board, hence why we need a second Arduino on the testPCB. It should just pass the results back for displaying.

As a general rule. It is easier to control multiple GPIO pins, sensors, ... from a single MCU. Just choose an MCU with more pins.

It is convenient to offload some tasks. But most involve reading a sensor or ADC. The MCU only has to "start" the peripheral. It comes back later when the peripheral has "completed" e.g. with an interrupt.

Hey-Ho. There are many ways to do things. The OP can choose for himself.


Can you draw a basic block diagram of your project, showing your hardware inputs and outputs.
It doesn't have to be a circuit diagram, just an indication of signal paths and controllers.

Thanks.. Tom... :grinning: :+1: :coffee: :australia:

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