This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C129EKCPDT: PCF8574 hd44780 without energia

Part Number: TM4C129EKCPDT
Other Parts Discussed in Thread: PCF8574, EK-TM4C1294XL

Is there a possibillity to interface an 16x4 LCD display via i2c without the arduino enironment?

There is a link where the tiva c drierlib was utilized on another display.

www.digikey.com/.../I2C Communication with the TI Tiva TM4C123GXL

display: hd44780

i2c-interface: PCF8574

regards,

Lukas

  • Hello Lukas,

    That is definitely possible to do. What you'd need to do is create a set of functions to handle the different LCD operations where you set the I/O connected to RS/RW/E correctly and then issue the I2C command(s) to the PCF8574.

    For a simple I2C implementation, you can review one of our TivaWare examples for the EK-TM4C1294XL LaunchPad, humidity_sht21_simple.

    That example can be found at: [Install Path]\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl-boostxl-senshub\humidity_sht21_simple

    That should give you the building blocks for I2C needed to create your custom LCD driver.

  • Hello Ralph,

    i tried to implement the common arduino-libfor the TM4C.

    I am able to switch the display on and of but i am not able to write a character to it. Do you have an idea what i am missing?

    The following code is an basic example. I attached the class. Iam not sure if the formatting worked..i2cLCD.hLiquidCrystal_I2C.cpp

        LiquidCrystal_I2C lcd(0x27,20,4);
        lcd.init();             //working
        lcd.backlight();        //working
    
    
        lcd.setCursor(3,0);
        lcd.print((char *)"Hello, world!");
        lcd.setCursor(2,1);
        lcd.print((char *)"Ywrobot Arduino!");
        lcd.setCursor(0,2);
        lcd.print((char *)"Arduino LCM IIC 2004");
        lcd.setCursor(2,3);
        lcd.print((char *)"Power By Ec-yuan!");

  • Hello Lukas,

    I am not sure how the porting from Arduino to TM4C would work. That's not something we support or have experience with. From what I see, there are a number of APIs in your file with a _ in front that I don't recognize so I am not sure how they function.

    If the display backlight is toggling, that just indicates the GPIO is working fine. I would recommend you try and monitor the I2C lines and the other GPIO to ensure the signals are correct. I don't have a lot else to offer really since that library isn't something we have much knowledge about and the initial I2C setup looks okay. If you check the bus you can see if you are actually sending data, then the problem would likely be in the timing of the signals.

    You will also want to be sure pull-up resistors are present as well for your system. I'm not sure if you have an EVM board for the PCF8574 or if you are breadboarding it.