Basys MX3™ Board Reference Manual
8
LCD Module
The Basys MX3 features a basic LCD module, the Sunlike Display SD1602H with a KS0066U display controller. It
displays two rows of 16 characters. It is controlled using a set of command signals (DISP_RS, DISP_R/W, DISP_EN)
and 8 data signals (DB0 - DB7). These signals make up a parallel port for communicating with the display.
The board also provides a switch to turn on and off the LCD display backlight, situated on the bottom right corner
of the LCD display.
The LCD display is controlled by a set of commands written to the device. Also, read commands provide the ability
to read status and data. Please read the SD1602H datasheet for a detailed list of read and write commands. The
LCD display requires a specific initialization sequence, also detailed in the datasheet.
The device features two types of memory: CGRAM and DDRAM.
The LCD controller contains a character-generator ROM (CGROM) with 192 preset 5×8 character patterns, a
character-generator RAM (CGRAM) that can hold 8 user-defined 5×8 characters, and a display data RAM (DDRAM)
that can hold 80 character codes. Character codes written into the DDRAM serve as indexes into the CGROM (or
CGRAM). Writing a character code into a particular DDRAM location will cause the associated character to appear
at the corresponding display location. Display positions can be shifted left or right by setting a bit in the instruction
register (IR). The write-only IR directs display operations (such as clear display, shift left or right, set DDRAM
address, etc.). A busy flag shows whether the display has completed the last requested operation; prior to
initiating a new operation, the flag can be checked to see if the previous operation has been completed.
The display has more DDRAM locations than can be displayed at any given time. DDRAM locations 00H to 27H map
to the first display row, and locations 40H to 67H map to the second row. Normally, DDRAM location 00H maps to
the upper left display corner (the "home" location), and 40H to the lower left. Shifting the display left or right can
change this mapping. The display uses a temporary data register (DR) to hold data during DDRAM /CGRAM reads
or writes, and an internal address register to select the RAM location. Address register contents, set via the
instruction register, are automatically incremented after each read or write operation. The LCD display uses ASCII
character codes. Codes up through 7F are standard ASCII (which includes all "normal" alphanumeric characters).
Codes above 7F produce various international characters.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Figure 8.1. LCD schematic diagram.
Page 24 of 56
Need help?
Do you have a question about the Basys MX3 and is the answer not in the manual?
Questions and answers