NOTE: The LCD Display works on a supply voltage between 4.7 V and 5.3 V. The following table shows the connections between I2C LCD Module and ESP8266 NodeMCU. You only need to provide the supply and I 2C connections. There are no other connections between I2C LCD Module and the actual LCD itself as the Module simply plugs into the pins of the LCD Display. We have to use these two pins to connect to PCF8574 I2C LCD Module. If you remember the pinout of ESP8266 NodeMCU, D1 and D2 i.e., GPIO 5 and GPIO 4 are frequently used for I 2C Communication.ĭ1 (GPIO 5) is the SCL Pin and D2 (GPIO 4) is the SDA Pin. Let us now understand how the ESP8266 NodeMCU I2C LCD Interface works. So, its pinout coincides with a typical 16×2 LCD, it contains a potentiometer to adjust the contrast and also a jumper to enable or disable the backlight. Instead of GPIO expansion, the I2C LCD Module is dedicated to drive a character LCD. Originally, it is used in modules to expand the GPIO Pins of a Microcontroller and it communicated with the microcontroller through I 2C Interface. A Brief Look at PCF8574 I2C LCD ModuleĪs the name suggests, the PCF8574 I2C LCD Module is based on the PCF8574 GPIO Expander IC. Thus from 6 GPIO Pins, we have come down to two GPIO Pins (SDA and SCL of I 2C). It is designed specially for 16×2 and 20×4 Character LCD Displays and communicates through, well, I 2C interface.
This is where the I2C LCD Module comes handy. Using that many GPIO Pins for a character LCD Display is not feasible, if you are planning to interface other important sensors and devices.
#ESP8266 ARDUINO LCD LIBRARY FREE#
After taking out all the dedicated GPIO pins (for SPI Flash IC and UART) we get around 9 GPIO Pins free to use.īut what if you want to interface a 16×2 Character LCD Display with ESP8266 NodeMCU? Even in 4-bit Parallel communication mode, the 16×2 LCD will take up 6 GPIO Pins of the microcontroller (four for Data, one for RS and one for E). Another advantage of this board is the GPIO Pins. The ESP8266 NodeMCU is a great development board for Wi-Fi related applications.
Getting the Slave Address of I2C LCD Module.