LCD driver for HD4480 behind PCF8574
Project description
Introduction
CircuitPython library for HD77480 LCD character displays with an I2C backpack. Currently PCF8574 is supported. This project is a fork of dhalbert/CircuitPython_LCD. A second pin layout of the PCF8574 was added. This fork is only tested on a raspberry 4 with these device
The original code started with the RPLCD library by Danilo Bargen, in https://github.com/dbrgn/RPLCD, but it has been reworked considerably.
On SAMD21 (M0) boards, lcd/lcd.py is too big to use as .py. Use mpy-cross to convert the .py files into .mpy. Also, use the minimal branch, to save space, if you don’t need all the features in the main branch.
Usage Example
The LCD supports character LCDs using the HD77480 chip.
The interface to the LCD is separated into an Interface class. Currently there is only one such class: I2CPCF8574Interface.
from lcd.lcd import LCD
from lcd.i2c_pcf8574_interface import I2CPCF8574Interface,PinMapping
from lcd.lcd import CursorMode
import busio
import board
comm_port = busio.I2C(board.SCL, board.SDA)
# Talk to the LCD at I2C address 0x27.
interface = I2CPCF8574Interface(comm_port, 0x27, PinMapping.MAPPING2)
lcd = LCD(interface, num_cols=20, num_rows=4)
lcd.print("abc ")
lcd.print("This is quite long and will wrap onto the next line automatically.")
lcd.clear()
# Start at the second line, fifth column (numbering from zero).
lcd.set_cursor_pos(1, 4)
lcd.print("Here I am")
# Make the cursor visible as a line.
lcd.set_cursor_mode(CursorMode.LINE)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file I2C_HD77480_LCD-0.1.1.tar.gz.
File metadata
- Download URL: I2C_HD77480_LCD-0.1.1.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
040881be36283e524c10800707770d4e0ebb18eb5b0317af65bd8c1f90be4613
|
|
| MD5 |
bb77a42c3206727af0216ab77e491d9f
|
|
| BLAKE2b-256 |
b5882d56a63a6d154c46f0dad9f565b831661016cd5796d7510218e95b551b59
|
File details
Details for the file I2C_HD77480_LCD-0.1.1-py3-none-any.whl.
File metadata
- Download URL: I2C_HD77480_LCD-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
754fb8145a262174f028daa250ed34ff552ee6d2e266d979e7998542f311763b
|
|
| MD5 |
98f1679468a057b6224239ec8f97214e
|
|
| BLAKE2b-256 |
0c6bc50a56d3ce4e6e556fab43d728564667d20056154c6008a83c0153dff3a7
|