Serialize Your HD44780 Liquid Crystal Display

June 9, 2005
Most LCD character displays connect to the outside world via a controller IC, such as the HD44780 (Hitachi) or equivalent. However, that interface has serious drawbacks. It uses a large number of the microcontroller's general-purpose I/O (GPIO) pins

Most LCD character displays connect to the outside world via a controller IC, such as the HD44780 (Hitachi) or equivalent. However, that interface has serious drawbacks. It uses a large number of the microcontroller's general-purpose I/O (GPIO) pins, and it can't provide digital contrast or backlight intensity control.

The circuit in the figure reduces the required number of GPIOs from 11 to two while also supplying digital control of the LCD's contrast and backlight intensity. A versatile I/O-port expander (U1) emulates the typical 8-bit I/O port of a microcontroller. You can implement this interface with little or no extra code if your microcontroller integrates an I2C peripheral. As an alternative, you can bit-bang the required signals through the regular GPIO pins.

Op-amp U3b buffers digital-to-analog converter (DAC) output OUT1, which controls the contrast voltage. DAC output OUT0 controls a constant-current sink consisting of op-amp U3A, MOSFET N1, and resistors R1, R5, and R6. This current sink draws 500 mA when the DAC voltage output is at full scale.

You may need to adjust the maximum LED backlight current according to the LCD display size. To do that, use the following equations to calculate resistor values R1, R5, and R6:

R1 = (VDD(MIN) — VFLED(MAX) — RDS(ON) —IFLED(MAX))/IFLED(MAX)

PR1 = IFLED(MAX)2 × R1

R5 = R6\[(VFS(DAC)/(R1 ×> IFLED(MAX)) — 1\]

where :

VDD(MIN) = minimum anode supply voltage (4.5 V typical),

VFLED(MAX) = maximum forward LED voltage,

IFLED(MAX) = maximum forward LED current,

RDS(ON) = on resistance of switch N1,

VFS(DAC) = full-scale voltage output of DAC,

PR1 = minimum power rating of resistor R1, and

R6 = 10 kO.

See associated figure

Sponsored Recommendations

What are the Important Considerations when Assessing Cobot Safety?

April 16, 2024
A review of the requirements of ISO/TS 15066 and how they fit in with ISO 10218-1 and 10218-2 a consideration the complexities of collaboration.

Wire & Cable Cutting Digi-Spool® Service

April 16, 2024
Explore DigiKey’s Digi-Spool® professional cutting service for efficient and precise wire and cable management. Custom-cut to your exact specifications for a variety of cable ...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!