News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Simple Program to Operate a 2x16 LCD Character Display Module

Started by GDeSantis, Dec 04, 2022, 04:49 PM

Previous topic - Next topic

GDeSantis

The attached program was used to operate a NewHaven 2X16 LCD Character Display Module.

The NewHaven display uses a Sitronix ST7066U controller which is a functional equivalent to the Hitachi HD44780 controller.
The program is quite simple in the sense that it places a simple text message on the display module and does nothing further.  It is an example only.

The program initializes the display module to operate in the 4-Bit data interface mode but does not use the busy flag to determine when the LCD controller is ready.  This means all time delays are longer than those specified in the datasheet to accommodate slower than normal LCD modules.

The display module RW line (pin 5) must be grounded for the program to function and the four data lines as well as the 2 control lines may be implemented on any available I/O pin of any port.