I2C Display & Nano

Hi all,

I wonder if someone can help me please?

I'm trying to communicate with this display via the I2C interface:

Does anyone know how I can identify or select the displays address please as I'm baffled!

Many thanks,


First off. Determine wheter you have the 5V or the 3V display.

Then connect to the SDA, SCL pins on your Uno and run an i2c_scanner sketch.
You can alter the Slave address by tying SA0, SA1 pins high or low.
Connect proper external pullup resistors. Tie CSB to 0V.

// --------------------------------------
// i2c_scanner
// Version 1
//    This program (or code that looks like it)
//    can be found in many places.
//    For example on the Arduino.cc forum.
//    The original author is not know.
// Version 2, Juni 2012, Using Arduino 1.0.1
//     Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26  2013
//    V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
//    by Arduino.cc user Krodal.
//    Changes by louarnold removed.
//    Scanning addresses changed from 0...127 to 1...119,
//    according to the i2c scanner by Nick Gammon
//    http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
//    As version 4, but address scans now to 127.
//    A sensor seems to use address 120.
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.

#include <Wire.h>

void setup() {

        GPIOB->regs->CRH |= 0xFF;
        AFIO_BASE->MAPR |= 0x02;
    Serial.println("\nI2C Scanner");

void loop() {
    byte error, address;
    int nDevices;


    nDevices = 0;
    for (address = 1; address < 127; address++) {
        // The i2c_scanner uses the return value of
        // the Write.endTransmisstion to see if
        // a device did acknowledge to the address.

        error = Wire.endTransmission();

        if (error == 0) {
            Serial.print("I2C device found at address 0x");
            if (address < 16)
            Serial.println(address, HEX);

        else if (error == 4) {
            Serial.print("Unknown error at address 0x");
            if (address < 16)
            Serial.println(address, HEX);
    if (nDevices == 0)
        Serial.println("No I2C devices found");

    delay(1000);           // wait 1 seconds for next scan

Your “datasheet” does not mention the Slave address value(s). It does not mention the controller either. Ask Farnell for more information.


Many thanks David.

According to your LCD Vendor, the LCD is an I2C Bus compatible device. The brief data sheet does not metion the device address which could be either of these two ranges: (0x20 - 0x27 if fitted with 8574 IO Extender) or (0x38 - 0x3F if fitted with 8574A IO Extender).

If you are using LiquidCrystal_I2C.h Library, you need to know the device address. As mentioned in Post#1, you can use an I2C Scanner Routine to find the device address.

If you are using hd44780.h Library, you don't need to know the device address; this particular library automatically detects the device address.

LCD devices like that normally to not use an i/o expander chip like a PCF8574 or MCP23008.
There would be no need.
So any library like LiquidCrystal_I2C is very unlikely to work.
Point of clarification: hd44780.h is not a library.
It is one header file that is part of the hd44780 library package - which includes support for many different i/o interfaces used to communicate with hd44780 type text LCDs.

The key information that is needed to talk to this LCD is what is the i2c slave and how does it work.
We need an actual full datasheet for chipset used on the LCD.
Many LCDs like that use or emulate PCF2116/PCF2119x i2c LCD slaves.

My hd44780 library does include support for PCF2116/PCF2119x LCD slaves but probably is not your display.
Your display may be using a ST7032 which is very close but slightly different.
Not sure if the code for the other will work as there are additional capabilities in the ST7032.
You could try it. The hd44780 i/o class is hd44780_I2Clcd
Eventually I'd like to add support for that device to the hd44780 library package, it should be fairly quick and easy to add.
So far they don't seem very popular, which is why I haven't bothered to obtain one to do it yet.

These links may be helpful:


--- bill