Project Karibu: Pretty lights for ECE2031.

[KNfLrPn Home]

- Navigation -


- Links -


- Download -

LCD.

The LCD is used to display a static welcome message greeting students to ECE2031:
"ECE2031 - DDL"
"Don't Panic."

LCD system
The LCD controller module ONESHOT_SLCD is written in VHDL, modified from a file provided to ECE2031 students during later labs. Its fairly simple operation consists of:

Initialization.

LCD datasheet

The most complicated part of communicating with the LCD is configuring it. In the above datasheet, you can see that there are quite a few options. The commands used in Karibu are:

    istr(0) <= x"38"; -- 8-bit data, 2-line display, 5x8 font
    istr(1) <= x"01"; -- move cursor to start of display
    istr(2) <= x"0C"; -- turn on display, don't display cursor
    istr(3) <= x"06"; -- move cursor right as data is written

Sending text.

By using the VHDL below:

    cstr( 0) <= CONV_STD_LOGIC_VECTOR(character'pos('X'),8);

an ascii character is converted to a STD_LOGIC_VECTOR and stored in an array. This array of 33 elements (sixteen character by two lines plus a line break) is sent to the LCD for display.

Alt text.

ONESHOT_SLCD actually has the ability to display two messages, toggled by the ALT_TXT input. This feature is used in Karibu for an "Easter egg".