Programmer’s Reference

An overview of the commands available is listed in Table 4-26.

 

 

Table 4-26 Character LCD display commands

 

 

 

Command

Bit

Description

pattern

 

 

 

 

 

Clear display

b00000001

Clears entire display and sets display RAM address counter to

 

 

zero.

 

 

 

Return home

b0000001x

Sets display RAM address counter to zero and returns the cursor

 

 

to the first character position. Display RAM contents are not

 

 

erased.

 

 

 

Entry mode set

b000001DS

Sets cursor move direction to increment (D HIGH) or decrement (D

 

 

LOW).

 

 

Specifies display shift (S HIGH).

 

 

This setting affects future display RAM read or write operation.

 

 

 

Display on/off

b00001DCB

Sets entire display on /off (D HIGH for on)

control

 

Sets cursor on/off (C HIGH for on)

 

 

Sets cursor position character blinking on/off (B HIGH for on).

 

 

 

Cursor or

b0001CDxx

Moves cursor (C LOW) or shifts display (C HIGH) right (D HIGH)

display shift

 

or left (D LOW) without changing display RAM contents.

 

 

 

Function set

b001LNFxx

Sets interface data length to 8 (L HIGH, the default) or 4 (L LOW).

 

 

Sets number of display lines to two (N HIGH, the default) or Sets

 

 

one (N LOW).

 

 

Sets character font to 5x10 (F HIGH, the default) or 5x8 (F LOW).

 

 

 

Set CGRAM

b01AAAAAA

Sets character generator RAM address to bAAAAAA. Character

address

 

generator RAM data is sent and received after this setting.

 

 

 

Set DDRAM

b1AAAAAAA

Sets display RAM address to bAAAAAAA. Display RAM data is sent

address

 

and received after this setting.

 

 

 

For more details on the character display, see the Hitachi HD44780 datasheet. Example code for accessing the character LCD is provided on the CD as part of the Boot Monitor and Selftest applications. This code is copied to your hard disk during installation, see:

install_dir\software\firmware\Platform\source\lcd_dbg.c

install_dir\software\projects\selftest\apcharlcd\apcharldc.c.

4-46

Copyright © 2003-2010 ARM Limited. All rights reserved.

ARM DUI 0224I

Page 212
Image 212
ARM ARM DUI 0224I manual An overview of the commands available is listed in Table, Character LCD display commands