Programmer’s Reference
4-46 Copyright © 2003-2007 ARM Limited. All rights reserved. ARM DUI 0224F
An overview of the commands available is listed in Table 4-26.
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
.
Table 4-26 Character LCD display commands
Command
Bit
pattern
Description
Clear display b
00000001
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
control
b00001DCB
Sets entire display on /off (
D
HIGH for on)
Sets cursor on/off (
C
HIGH for on)
Sets cursor position character blinking on/off (
B
HIGH for on).
Cursor or
display shift
b0001CDxx
Moves cursor (
C
LOW) or shifts display (
C
HIGH) right (
D
HIGH)
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
address
b01AAAAAA
Sets character generator RAM address to b
AAAAAA
. Character
generator RAM data is sent and received after this setting.
Set DDRAM
address
b1AAAAAAA
Sets display RAM address to b
AAAAAAA
. Display RAM data is sent
and received after this setting.