all projects

project 18 / 31

RPi LCD Driver Module

Python module for talking to HD44780 LCDs from a Raspberry Pi - 4-bit nibble mode, commands/data, cursor control and rotating long strings.

#python#raspberry pi#lcd#hd44780#gpio#proteus#embedded

About this project

A module for communication between an LCD and a Raspberry Pi; the article covers how to send commands and data.

Usage: from lcd import LCD lcd = LCD(rs=5, en=6, d4=12, d5=13, d6=16, d7=19)

lcd.cursor_start(0, 0) # (cursor, row) lcd.print_line("string") lcd.send_commands(0x01) # send command to LCD lcd.rotate_line("long strings") # print paragraphs

Characters go out 4 bits at a time - the diagram shows how a byte splits into high and low nibbles on D4-D7.

hosted on fly.io