Académique Documents
Professionnel Documents
Culture Documents
ECNG 3016
ADVANCED DIGITAL ELECTRONICS
http://myelearning.sta.uwi.edu/course/view.php?id=686
Semester II 2009/2010
1.
GENERAL INFORMATION
Lab #:
Name of the Lab:
4
Design and Implementation of a LCD Hardware Driver
Lab Weighting:
35%
Delivery mode:
Lecture
Online
Lab
Other
Microprocessor Laboratory
Lab Dependencies2
Recommended
prior knowledge
and skills3:
Course Staff
Position/Role
Estimated total
study hours1:
Cathy Radix
Lecturer
E-mail
Cathy.Radix@sta.uwi.tt
Azim Abdool
Instructor
azim.abdool@sta.uwi.tt
10
Phone
Office
Office
Hours
x3157 Rm 321, Mon/Tue
Blk 1
11am 2pm
x2636 Rm 341/ Mon/
RTSG,
Thu
Blk 1
11am12pm
2.
Upon successful completion of the lab assignment, students will be able to:
1. Understand the operation of the HITACHI HD44780 LCD controller chip
and its involvement in the JHD204A LCD display.
2. Implement a FSM plementation of a LCD Hardware driver for the
JHD204A LCD display
3. Use the FSM-D method in the design of a finite state machine
3. PRE-LAB
Due Date:
Submission
Procedure:
Estimated time to
completion:
Cognitive
Level
C
Ap
Ap, Sy
3.4.1
Name of Pin
GND
VDD
VEE
RS
W/R
E
D0
D1
D2
D3
D4
D5
D6
D7
LED+
LED-
Connection
FPGA GND
FPGA VCC (+5V)
FPGA GND
FPGA Pin
FPGA GND
FPGA Pin
FPGA Pin
FPGA Pin
FPGA Pin
FPGA Pin
FPGA Pin
FPGA Pin
FPGA Pin
FPGA Pin
Unconnected
Unconnected
In this lab we will not be reading data from the LCD, hence the W/R pin will be fixed to ground
(GND).
Students will be required to perform the following functions using the JHD204A LCD:
Clear display
It is to be noted that when a command is sent to the LCD, the state of the RS and E pins must be
altered in order to achieve the desired functionality. Pin E must be set HIGH for at least 500s
for each command. Pin RS must only be set HIGH when data is to be displayed on the LCD.
Table 2 below gives a summary of the nature of both the RS and E pins for the required
functions of the system.
System Functionality
Display data on LCD
Clear display
Set cursor position
The FSM-type LCD Hardware driver for the JHD204A LCD display will consist of a central
control unit we call the Instruction Controller. We can model the Instruction Controller using a
flow chart as shown in Figure 1 below. This flowchart will be of significant importance in the
in-lab section of the lab. Since we will be utilizing the FSM-D method for creating this unit, it is
important as a first step that you understand the strategy that it implements.
4.
IN-LAB
6. Open Xilinx ISE and create a new project called FSM_LCD_Hardware_Driver. Write the
VHDL code for the LCD hardware driver data-path and FSM controller . Perform simulations
at the behavioural and PAR levels using the ISim simulator for:
a. the data-path elements [3 marks]
b. the FSM controller [3 marks]
c. the final instruction controller entity [3 marks]
7. Implement the frequency divider required to produce a 10 kHz clock signal for both the 3-bit
debounce module and the instruction controller in VHDL. Implement the 3-bit debounce
module for the system in VHDL. You can utilize the language template example to assist in its
creation. Perform simulations at the behavioural and PAR levels using the ISim simulator. [3
marks]
8. Interface system modules together in a VHDL module named LCD_FSM_Driver_Main.vhd.
Use the block diagram of Figure 2 as your guide. Create an implementation constraints file for
the system and connect the Spartan 3 development board to the LCD. Download the bitstream
to the Spartan 3 FPGA development board and perform on-board testing on the system. [2
marks]
9. Another module, called message_printer, will interface with instruction_controller and print to
the LCD screen a message on the first line Adv Dig and on the second line Done.
Message_printer should take the message from a 16x16 bit ROM that should store each
DDRam address alongside the character to be printed. Be sure to follow the first two steps of
the FSM-D procedure to design message_printer by creating the algorithm and the system
interface. [3 marks]
10. For the message_printer module proposed above, use the steps of the FSM-D procedure to
implement and test on the Spartan 3 development board. [13 marks]
5.
POST-LAB
Due Date:
Submission
Procedure:
Deliverables: