LCD Display Drivers Lecture

Post on 10-Apr-2015

519 views 2 download

Transcript of LCD Display Drivers Lecture

Writing to an LCD

HD44780 LCD Drivers

16x1 LCD Module

16 characters, 1 row8-bit or 4-bit parallel interfaceIndustry standard HD44780 controllerVariations: backlight, polarizer, reflective, wide viewing angle.

http://www.crystalfontz.com/products/1601a/index.html#CFAH1601ANYGJP

HD44780U (LCD-II)

Dot Matrix Liquid Crystal Display Controller/DriverCan be controlled by 4- or 8-bit modeCan control up to one or two 8-character linesLow power supply (2.7V to 5.5V)5x8 and 5x10 dot matrix possible80 x 8-bit Display Data RAM (80 characters max)9,920-bit character generator ROM for 240 fonts

Interfacing to the LCD

Mapping Character Codes

to Character Patterns

Display Data RAM (DDRAM)

To write data to display, store individual characters into DDRAMLCD controller reads DDRAM and displays the data represented in 8-bit character codesCan store up to 80 characters16x1 can be implemented as a 2-line display of 8 characters (8x2) using same controller

Interfacing to the MCU

Pin Functions

Interfacing to the MCU

Interfacing to the MCU

4-bit mode: only DB4-DB7 used, two nibbles sent successively, high-order nibble first.

Instruction Descriptions

display clear – 20H to all locationscursor home – sets address counter to DDRAM 0display on/off control

cursor on/offdisplay character blink

cursor or display shiftfunction set

DL: data length interface (4 or 8 bits)N: number display linesF: character font

entry mode – what happens after character writeI/D: DDRAM incremented or decrementedS: shift display left or right

[1] Hitachi. HD44780U (LCD-II) Dot Matrix Liquid Crystal Display Controller/Driver Datasheet. www.datasheet4u.com/html/H/D/4/HD44780UA00FS_Hitachi.pdf.html

Set Function: 8 bite mode

Set Function: 4-bit mode

Function Set: #lines and font

Clear display

Set entry mode

Display Off

Character Generator ROM

Create your own fonts: 5x8 or 5x10 dot patterns

CGRAM can also be used as general purpose RAM

LCD Segment Displays

Lower tech, earlier design, cheapHere, each segment is made of 7 bars

Coding Segments

Each bar in a segment is labeled with a letterCreate map of bars to display each letter and number