Yes, I2C is very handy. Now I only use I2C displays on the Arduino. And for bigger stuff on the ESP32, the SPI interface.
For example, the LCDs have 14 pins, or 16 if you include the back light.
There are 2 power pins, 1 contrast, 3 control pins and either 4 or 8 data pins depending on the mode of operation of the LCD. 8 data pins will be faster but for most times, speed is not an issue for character LCDs.
This is an image I found to show the LCD in the 4 bit mode. D0 to D3 are not used. So 6 Arduino port pins are in use.
In fact, there is another pin, the Read/Write pin that is usually connected to 0V, but can be driven with another port pin if you want to read the LCD RAM. But this is not often done.
If you use an I2C interface to drive the LCD, the LCD connects to the I2C board and only 4 wires go to the Arduino. 2 of these are the power, so just 2 port pins are needed.
And, these 2 pins, the SDA and SCL (data and clock) pins can be shared with other I2C devices that have a different address.
I2C is very handy indeed.
For example, the LCDs have 14 pins, or 16 if you include the back light.
There are 2 power pins, 1 contrast, 3 control pins and either 4 or 8 data pins depending on the mode of operation of the LCD. 8 data pins will be faster but for most times, speed is not an issue for character LCDs.
This is an image I found to show the LCD in the 4 bit mode. D0 to D3 are not used. So 6 Arduino port pins are in use.
In fact, there is another pin, the Read/Write pin that is usually connected to 0V, but can be driven with another port pin if you want to read the LCD RAM. But this is not often done.
If you use an I2C interface to drive the LCD, the LCD connects to the I2C board and only 4 wires go to the Arduino. 2 of these are the power, so just 2 port pins are needed.
And, these 2 pins, the SDA and SCL (data and clock) pins can be shared with other I2C devices that have a different address.
I2C is very handy indeed.
Last edited: