The LCD driver in this application note is specifically design for displaying characters one at a time on the LCD.
Important things about the LCD
The LCD should be initialize before displaying any characters, the initialization procedures for my LCD driver are:
1. Function set - set
8 bit long data interface, 5x11 dot character font, and 2 line display.
2. Display on - set
display on, cursor on, and blink on.
3. Entry mode set
- set entry mode to increment the cursor after a character is displayed.
4. Display Clear -
clear the LCD display.
After these 4 instructions were input and processed by the LCD, data instructions can then be input to the LCD to display a character.
Important things about LCD timing:
1. The LCD should have
at least 1.64ms to process clear or home instruction and 40us to process
any other instructions.
2. When the register
select signal is changed, there should be a 140ns address setup time before
the enable signal is set to 1.
3. When displaying
character on the LCD, enable signal should have be 1 for at least 450ns.
4. The data
setup time and data hold time should be at least 195ns and 10ns respectively.
Here are the files:
Top level file - lcd.vhd
package file - lcd_pkg.vhd
component files - counter.vhd,
lcddriver.vhd
Instructions on using the LCD driver
To change the character output to the LCD, change the lcd.mif file. Compile the package file, lcd_pkg.vhd, and then compile the top level file,lcd.vhd.