URL
https://opencores.org/ocsvn/hd44780_driver/hd44780_driver/trunk
Subversion Repositories hd44780_driver
[/] [hd44780_driver/] [trunk/] [readme.txt] - Rev 3
Compare with Previous | Blame | View Log
Information to the Project HD44780 Driver-----------------------------------------This project contains VHDL descriptions for driving a standard HD44780LCD Driver with a minimum of inputs. Please read on.Information-----------Author: J.E.J. op den Brouw <J.E.J.opdenBrouw@hhs.nl>Company: De Haagse Hogeschool <www.hhs.nl>Rationale: This driver is written to facilitate my studentsSoftware: Quartus II v11.1 / ModelSim v10.0.c / Windows 7Hardware: Terasic DE0 board with optional display (Cyclone III)Status: Alpha, tested by my students.Files-----lcd_driver_hd44780_module.vhd - The Drivertb_lcd_driver_hd44780_module.vhd - Simple testbenchtb_lcd_driver_hd44780_module.do - ModelSim command fileexample_driver.vhd - Example on how to use the drivertb_example_driver.vhd - Simple testbenchtb_example_driver.do - ModelSim command filelcd_driver_hd44780.sdc - Synopsys Constraints File (clock info only)readme.txt - This fileOverall Description----------------------------------------------------------------------------------------Currently, this driver uses the 8-bit databus mode. This is not a big problemfor most FPGA's because of the numerous pins.Please note that there are a lot of almost-the-same displays available, soit's not guaranteed to work with all displays available. Also, timing may differ.This code is tested on a Terasic DE0-board with an optional LCD display.See the weblinks:http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=56&No=364http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=78&No=396for more info. The display used has only two lines.The VHDL descriptions can both be simulated and synthesized.This driver has a User Side and a LCD Side. The user is to interface at the User Sideand has a number of "routines" at her disposal. The User Side implements the followinginputs/routines in order of priority:Command inputs:init: a logic 1 initializes the displaycls: a logic 1 clears the display (and goes to home)home: a logic 1 sets the cursor to row 0, column 0goto10: a logic 1 sets the cursor to row 1, column 0goto20: a logic 1 sets the cursor to row 2, column 0goto30: a logic 1 sets the cursor to row 3, column 0wr: a logic 1 writes a character to the displayData inputs:data: an 8-bit data to be written to the displayThe user has one observable output:busy: a logic 1 indicates that the driver is currentlybusy driving the display, a logic 0 indicates thatthe driver waits for the next command.The user can supply the next generics, which are processed atinstantiation of the module:freq: the clock frequency at which the hardware has to run.this frequency is mandatory because of internal delayscalculated, defaults to 50 MHz.areset_pol:the polarity of the reset signal, defaults to High (1)time_init1:the time to wait after Vcc > 4.5 Vtime_init2:the time to wait after first "contact"time_init3:the time to wait after the second contacttime_tas:the RW and RS signal setup time with respect to the positiveedge of the E pulsetime_cycle_e:the complete cycle timetime_pweh:the E pulse width high timetime_no_bf:time to wait before command completion if no Busy Flag reading is done,some designs connect RW to logic 0, so reading from the LCD is notpossible, saves a pin.cursor_on:true to set the cursor on at the display, false for no cursorblink_on:true to let the cursor blink, false for no blink (just a underscore)use_bf: true if Busy Flag reading is to be used, false for no BF readingNote: it's not possible to write command codes to the display.A note about timing:Some of the timing parameters are very small, e.g. the RW and RS setup time withrespect to rising edge of E. If the clock frequency is too low, the delay calculatedwill be zero, which result in at least a delay with the period time of the clock.A note about implementing:If the driver doesn't work or you get clobbered strings, please use non-BFreading at first. Next, increase the Cycle E time and PWeh time.
