Lcd controller, Memory map, Dd ram – Xilinx MIcroblaze Development Spartan-3E 1600E User Manual
Page 46: Cg rom

44
MicroBlaze Development Kit Spartan-3E 1600 Edition User Guide
UG257 (v1.1) December 5, 2007
Chapter 5:
Character LCD Screen
R
LCD Controller
The 2 x 16 character LCD has an internal Sitronix
functionally equivalent with the following devices.
x
Samsung
x
Hitachi HD44780
x
SMOS 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
character set or in the user-defined
character set.
shows 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
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
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
Figure 5-4
. The character
for each character location subsequently references a position with
the CG ROM. For example, a hexadecimal character code of 0x53 stored in a
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 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
40
10
27
50
67
. . .
. . .
. . .
1
2
Character Display Addresses
Undisplayed
Addresses
UG257_05_03_061206