You are on page 1of 16

Writing to an LCD

HD44780 LCD Drivers


16x1 LCD Module

„ 16 characters, 1 row
„ 8-bit or 4-bit parallel
interface
„ Industry standard
HD44780 controller
„ Variations: backlight,
polarizer, reflective,
wide viewing angle.

http://www.crystalfontz.com/products/1601a/index.html#CFAH1601ANYGJP
HD44780U (LCD-II)

„ Dot Matrix Liquid Crystal Display Controller/Driver


„ Can be controlled by 4- or 8-bit mode
„ Can control up to one or two 8-character lines
„ Low power supply (2.7V to 5.5V)
„ 5x8 and 5x10 dot matrix possible
„ 80 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 DDRAM
„ LCD controller reads DDRAM and displays the
data represented in 8-bit character codes
„ Can store up to 80 characters
„ 16x1 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 locations


„ cursor home – sets address counter to DDRAM 0
„ display on/off control
„ cursor on/off
„ display character blink
„ cursor or display shift
„ function set
„ DL: data length interface (4 or 8 bits)
„ N: number display lines
„ F: character font
„ entry mode – what happens after character write
„ I/D: DDRAM incremented or decremented
„ S: 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
Display Off
Clear display
Set entry mode
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, cheap
„ Here, each segment is made of 7 bars
Coding Segments

„ Each bar in a segment is labeled with a letter


„ Create map of bars to display each letter and number

You might also like