LCD Controller and User Logic in VHDL and Programming A FPGAs Posted
LCD Controller and User Logic in VHDL and Programming A FPGAs Posted
The LCD module (HD44780) at DE2 board has built-in fonts and can be used to display text by
sending appropriate commands to the display controller. The controller manages the initialization
and data flow to HD44780 compatible 8-bit interface character LCD modules. Figure 1 depicts the LCD
controller implemented to interface between an LCD module and a user’s custom logic.
lcd_controller
inst
Clock for LCD controller. Default set for 50MHz. If a different frequency is
system clock
clk 1 input desired, change the constant freq in the architecture declarations to reflect the
(50MHz)
new frequency in MHz.
Active low synchronous reset pin. This pin must be set high to implement the
reset_n 1 input LCD controller. Setting the pin low for one or more clock cycles restarts the user logic
LCD controller state machine.
Data latch for LCD controller. H: initiates a transaction using the data
lcd_enable 1 input currently on the lcd_bus, L: no transaction is initiated and any data on lcd_bus user logic
is ignored
rs 1 output LCD module Register Select Signal; H: sending data, L: sending instructions LCD pin 4
rw 1 output LCD module Read/Write Select Signal; H: Read, L: Write LCD pin 5
LCD pins 7-
lcd_data 8 bidir Data bus to the LCD module / busy signal from the LCD
14
Pin assignments for the LCD
Signal Name FPGA Pin No. Description
LCD_DATA[0] PIN_J1 LCD Data[0]
LCD_DATA[1] PIN_J2 LCD Data[1]
LCD_DATA[2] PIN_H1 LCD Data[2]
LCD_DATA[3] PIN_H2 LCD Data[3]
LCD_DATA[4] PIN_J4 LCD Data[4]
LCD_DATA[5] PIN_J3 LCD Data[5]
LCD_DATA[6] PIN_H4 LCD Data[6]
LCD_DATA[7] PIN_H3 LCD Data[7]
LCD_RW PIN_K4 LCD Read/Write Select, 0 = Write, 1 = Read
LCD_EN PIN_K3 LCD Enable
LCD_RS PIN_K1 LCD Command/Data Select, 0 = Command, 1 = Data
LCD_ON PIN_L4 LCD Power ON/OFF
LCD_BLON PIN_K2 LCD Back Light ON/OFF
lcd_user_logic lcd_controller
1) lcd_user_logic.vhd
2) lcd_controller.vhd
Reference:
https://eewiki.net/pages/viewpage.action?pageId=4096079