Telecnatron Forum

Discuss and comment on telecnatron.com articles and related topics.

Welcome! [Log In] [Register]
It also works on Banana Pi Thanks!
great information provided! I tried using this binary however my lcd just illuminates but no text appears. The link below shows the steps I have taken to troubleshoot. any suggestions are greatly appreciated. [fruanc.wordpress.com]
Hi, is your code somewhere in source control? (GitHub ...) Cheers, Antony
I just wanted to say thank you for your work. This was a fantastic article and the lcdi2c worked first time out the box. Most appreciated.
I tried your lcdi2c program on a i2C LCD display module which I bought from [www.banggood.com] No text display on the module.
Hi! Is it possible to define custom character with in LCDI2C.C? I need some special ones: éáöüóőúűí. I know the bytes which describe these characters, but I do not know how can I send them to the device. THANK YOU! The bests!
Hi! Thanks a lot for your utility! It perfectly works with my LCD102. But I would also like it to make work on LCD2004. Do you know what should I change in code?
Hey! Just tried it on LCD2004 Backpack Module. And it seems as the options: -r 4 -c 20 don't work. Any ideas? Thanks in advance..
Hi! Great job! Thanks a lot for utility. But -s option as well as support of LCD2004 don't work. Meaning, cursor always blinks and there's no way to write text on 3-rd and 4-th row. It works as 1602.
Thanks! Works fine. Other than the -s option. Cursor blinks whatever you use: 0, 1 or 3
Hello! Is it allowed to use the source (or parts of it) in an own project, that might be become commercial later? Regards, Andreas
Hi i use Your code in my open project nettemp.pl, work like a charm grinning smiley thanks
Re: Utility To Control 1602 LCD On Raspberry Pi Via A PCF8574 I2C Backpack Module
June 19, 2024 07:45PM
To control a 1602 LCD on a Raspberry Pi via a PCF8574 I2C backpack module, you can use the Python programming language along with the RPi.GPIO and smbus libraries.

First, make sure you have the necessary hardware components:

Raspberry Pi board
PCF8574 I2C backpack module
1602 LCD module
Follow these steps to set up and control the LCD:

Connect the PCF8574 module to the Raspberry Pi:

Connect the VCC pin of the backpack module to the 5V pin on the Raspberry Pi.
Connect the GND pin of the backpack module to the GND pin on the Raspberry Pi.
Connect the SDA pin of the backpack module to the SDA pin on the Raspberry Pi.
Connect the SCL pin of the backpack module to the SCL pin on the Raspberry Pi.
Connect the 1602 LCD module to the PCF8574 module:

Connect the VCC pin of the LCD module to the VCC pin on the PCF8574 module.
Connect the GND pin of the LCD module to the GND pin on the PCF8574 module.
Connect the SDA pin of the LCD module to the SDA pin on the PCF8574 module.
Connect the SCL pin of the LCD module to the SCL pin on the PCF8574 module.
Install the required libraries:

Open a terminal on the Raspberry Pi.
Install the RPi.GPIO library by running the command: pip install RPi.GPIO
Install the smbus library by running the command: pip install smbus
Write a Python script to control the LCD:

Use a text editor to create a new Python script, e.g., lcd_control.py.
Import the necessary libraries at the beginning of the script:
import RPi.GPIO as GPIO
import smbus
Set up the I2C bus and LCD address:
i2c_bus = smbus.SMBus(1) # Use 0 for older Raspberry Pi boards
lcd_address = 0x27 # Change this address if your module has a different address
Define the LCD functions:
You can find Python libraries or sample code online that provide functions for controlling the LCD via the PCF8574 module. These functions typically include initializing the LCD, writing text, and controlling the backlight.
Use the defined functions to control the LCD as needed in your script.
Save the Python script and run it:

Save the lcd_control.py script.
In the terminal, navigate to the directory where the script is saved.
Run the script using the command: python lcd_control.py
Ensure that you have the correct pin mappings and addresses for your specific modules, as they may vary. Additionally, make sure you have the necessary permissions to access the I2C interface on your Raspberry Pi.

Note: The instructions provided here are a general guideline. It's always recommended to refer to the documentation and specifications of your specific LCD module and PCF8574 I2C backpack module for more accurate and detailed information on wiring and programming.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: