44 MicroBlaze Development Kit Spartan-3E 1600 Edition User Guide
www.xilinx.com UG257 (v1.1) December 5, 2007
Chapter 5: Character LCD Screen R
LCD Controller
The 2x 16 character LCD has an internal Sitronix ST7066U graphics controller that is
functionally equivalent with the following devices.
xSamsung S6A0069X or KS0066U
xHitachi HD44780
xSMOS SED1278

Memory Map

The controller has three internal memory regions, each with a specific purpose. The
display must be initialized before accessing any of these memory regions.

DD RAM

The Display Data RAM (DD RAM) stores the character code to be displayed on the screen.
Most applications interact primarily with DD RAM. The character code stored in a DD
RAM location references a specific character bitmap stored either in the predefined CG
ROM character set or in the user-defined CG RAM character set.
Figure 5-3shows the default address for the 32 character locations on the display. The
upper line of characters is stored between addresses 0x00 and 0x0F. The second line of
characters is stored between addresses 0x40 and 0x4F.
Physically, there are 80 total character locations in DD RAM with 40 characters available
per line. Locations 0x10 through 0x27 and 0x50 through 0x67 can be used to store other
non-display data. Alternatively, these locations can also store characters that can only
displayed using controller’s display shifting functions.
The Set DD RAM Address command initializes the address counter before reading or
writing to DD RAM. Write DD RAM data using the Write Data to CG RAM or DD RAM
command, and read DD RAM using the Read Data from CG RAM or DD RAM command.
The DD RAM address counter either remains constant after read or write operations, or
auto-increments or auto-decrements by one location, as defined by the I/D set by the Entry
Mode Set command.

CG ROM

The Character Generator ROM (CG ROM) contains the font bitmap for each of the
predefined characters that the LCD screen can display, shown in Figure5-4. The character
code stored in DD RAM for each character location subsequently references a position with
the CG ROM. For example, a hexadecimal character code of 0x53 stored in a DD RAM
location displays the character ‘S’. The upper nibble of 0x53 equates to DB[7:4]=”0101”
Figure 5-3: DD RAM Hexadecimal Addresses (No Display Shifting)
00 01 02 0304 05 06 07 08 09 0A0B 0C 0D0E 0F
40 41 42 4344 45 46 47 48 49 4A4B 4C 4D4E 4F
1234 5 6 7 8 9 10 11 12 1314 15 16 17 40
10 27
50 67
. . .
. . .
. . .
1
2
Character Display Addresses
Undisplayed
Addresses
UG257_05_03_061206