pcf8574 lcd module made in china

I have to say that after some time working properly the LCD started to display strange characters. Before that the right characters were blinking while the LED backlight was always ON.

Ithink I have to order new I2C modules since I have another 16x02 LCD working good with the traditional 4 data wires connection. This is the module I"m gonna buy: I2C module

but for getting product into the USA, the backpacks are available for $1 USD shipped, and LCD+Backpack already soldered starts at $2 USD shipped from many low cost vendors. The low cost vendors are from china and may take a while to get.

pcf8574 lcd module made in china

I2C stands for “Inter-Integrated Circuit“, it allows to connect multiple modules or “slave”, and requires only 2 wires no matter the amount of connected modules, on an Arduino you can have up to 128 slave devices.

Those address are in hex values (ex. ox20), and most module give you the possibility to change the address by either soldering some pads or using dip switches like the I2C Expander module we used.

The main difference between those two modules, is their pinouts, the LCD Backpack pinout is made to fit on an LCD with additional outputs for the backlight.

Since both the I2C port Expander and the I2C LCD Backpack are pretty much the same, couldn’t I just use the LCD Backpack to connect the Bourns encoder?

But if your project can make due with only 7 I/O pins then you can use the LCD Backpack as an I2C Expander since those other pins are properly connected.

So instead of using 7 Pins on the Arduino, were’s using the I2C protocol and using only 2 Pins to read the Keypad as well as display the results on the LCD screen.

pcf8574 lcd module made in china

First, thanks for posting this – it enabled me to quickly bring up a 2 LCD project I’m working on. However, I found I needed the communication to the LCDs to go much faster. This project operates at a 10Hz refresh rate, and I was spending 40ms of that just writing to the LCDs. After a bit of datasheet study, I found that one can write a stream to the PCF8574. That is: Start Addr Data Data … Stop will result in the data output being updated on each data byte without having to resend the address for each nibble. The result on a one-byte write to the LCD is 5 I2C character times instead of 8 for a single character write. A stream of many chars can be sent. For a 5-character write to the LCD, the result is 21 I2C byte times versus 40, nearly doubling the throughput to the LCD.

2 addresses. Communication with one address will mimic the PCF8574 but allow much higher clock rate to get around the 100khz limitation of the PCF8574, while communication with the other address will do a byte-write to the LCD in 2 I2C character times, and write N bytes in N+1 I2C character times. If this backpack is operated at 400khz instead of 100 khz, the result will be an 8x speed improvement over the original implementation.

pcf8574 lcd module made in china

A regular LCD requires a lot of wires (parallel interface) to be connected with a Microcontroller.The Serial LCD  backpack built on PCF8574 IC uses the I2C bus to convert  the parallel interface to a serial one.This needs only2 wires SDA & SCL , apart from the power connections.

The blue preset is to adjust the contrast of the LCD. The black jumper on the left is to enable the Backlight of LCD. The I2C device has a HEX address by which a microcontroller can communicate with it.This is set by the 3 bits A0,A1 ,A2 .If no jumper is present , it is HIGH &  a jumper means LOW. By default all the 3 jumpers are open . ie., A0,A1 A2 all are 1s.

lcd.setBacklightPin(HIGH);  makes the P3 pin go High, which turns on the NPN transistor.This provides GND to the LED pin of LCD As the other LED pin is already connected to Vcc through the jumper , the LCD backlight glows.

pcf8574 lcd module made in china

I recently acquired, via eBay, a 40X4 HD44780 based LCD screen that has a daughter-board on the back that provides an I2C interface, labled “LCD2004“. This permits interfacing with only two wires (SDA/SCL) plus ground and 5-volts. This particular board is sold by a Chinese company,  SainSmart.com. SainSmart provides its own version of the Arduino LiquidCrystal library and some example code. Unfortunately, both the library are for the old version of the Arduino IDE and will not compile with the current Arduino 1.0 version.

To get the I2C display to work I did some reverse engineering. The LCD2004 board utilized the PCF8574 I/O expander. This nifty little chip provides eight bits of parallel I/O addressable by a I2C bus address – 0x00 to 0x27. SainSmart tied all address leads to Vcc, so the LCD2004 board’s I2C address is permanently fixed at hex 27. This is rather limiting since no additional LCD2004s can be added to the bus. Anyway, you simply address the board and write an eight bit value which is then presented on the output pins of the PCF8574, which, in this case, are connected to the HD44780 based LCD screen.

After some reverse engineering to determine which PCF8574 pins were connected to which LCD pins, I was able to use  F Malpartida’s NewLiquidCrystal library to write a functional test program. The unit works quite nicely and my code and schematic can be obtained in my BitBucket Repository.

The SainSmart LCD2004 board is identical to one offered by YwRobot and SainSmart’s provided example code is even marked with Ywrobot. Possibly SainSmart merely markets the Ywrobot board under their name, or possibly they cloned it. Furthermore, both Ywrobot may have obtained its design from DFrobot. DFRobot may have been the original board designer given their more professional approach of decent documentation, but given China’s disregard for intellectual property rights, who knows for sure? Also, DFRobot has and active forum with timely responses by their engineers, and a wiki, which is another plus for their professionalism. DFRobot’s board and SainSmart’s significantly differ, physically, so if SainSmart copied DFRobot, it was only from their schematic and not the board design.

A more versatile I2C LCD board would be to use the design offered by F Malpartida. Her I2CLCDextraIO board allows you to define a unique address for each LCD, permitting a multi-display configuration with all controlled over one I2C bus. Her designs are freely available in her BitBucket repository if you’d like to make your own board. You can also buy her bare board or assembled unit from ElectroFUN.