SlideShare a Scribd company logo
Chapter:10
Calculator Design with LCD Using FPGA
By:
Hossam Hassan
PhD Student, MSIS Lab,
Chungbuk National University
MSIS
Objectives
• In this lab we will deal with the LCD (Liquid Crystal Display) display which as dot-matrix used
to display information on many devices.
• We will write Verilog code to implement a basic calculator and show the results on the LCD
display then simulate how to drive LCD display and synthesis the code to run on FPGA board.
• We will consider the following code for the calculator operation:
Binary Code Operation
000 Nothing to do
001 +
010 -
011 *
100 /
101 =
110 ~ 111 Nothing to do
Objectives
• Our design for simple calculator will be as following:
• Enter your First digit (Only One Digit)
• Select Arithmetic Operation (+,-,/,*)
• Enter your Second digit (Only One Digit)
• The result is ………….
Introduction
• Text LCD modules are cheap and easy to interface using a microcontroller or FPGA.
• LCDs are used in a wide range of applications including computer monitors,
televisions, instrument panels, aircraft cockpit displays, and signage.
• They are common in consumer devices such as DVD players, gaming devices,
clocks, watches, calculators, and telephones, and have replaced cathode ray tube (CRT) displays in
most applications.
• An LCD is made with either a passive matrix or an active matrix display grid.
• The passive matrix LCD has a grid of conductors with pixels located at each intersection in the grid.
• A current is sent across two conductors on the grid to control the light for any pixel.
• The active matrix LCD is also known as a thin film transistor (TFT) display.
• An active matrix has a transistor located at each pixel intersection, requiring less current to control the
luminance of a pixel. For this reason, the current in an active matrix display can be switched on and off more
frequently, improving the screen refresh time.
Introduction
• A simplified scheme of time multiplexing with passive matrix
displays is shown in Figure.
• A short pulse is applied periodically to the rows as a strobe
signal, whereas the columns carry the information signals.
• A pixel is only selected if a difference in potential (and,
therefore, an electrical field) is present, that is, only if the row
and column are not on a low or high level at the same time.
Text LCD module
• Let's drive the LCD module from an FPGA board.
• Text-LCD module is in the form of a one controller and the LCD Panel.
• You have to transmit the data via the data bus, the controller can obtain desired display.
• The figure below shows the internal structure of a LCD module.
Text LCD module
• LCD controlled via a control lines:
• E (module selection signal Enable): command to enable the LCD, this should be the first pin to the action, such as rea
ding or writing data.
• RS (internal register selection): a command input and the output of the inner pin is used to select one of the memory
. RS is 0 (read mode), RS is 1 (write mode).
• R/W (input / output selection): is used to select the data read and write data. If the R / W is 0 and the data write, R /
W is 1, the data read state.
• DB0 ~ DB7 sending and receiving data through the 8-bit data bus of LCD controller
• Vdd and Vss are the module voltage that operates on + 5V power supply.
Text LCD module
• Table provides a summary of the features and a control
signal for use with an LCD. (For More information refer to
the manual)
1. Clears the screen.
2. Move the cursor to the position (Home) on the upper-left.
3. The character output decide whether to go forward to go back
one character. I/D = 1: increases, I/D = 0 decreases, S = 1: Acco
mpanies display shift
4. The display ON/OFF, the cursor of the ON/OFF, a cursor blink
ON/OFF determination D = 1: Screen ON, C = 1: cursor ON, B =
1: flashing ON
5. determining a direction in case of transmitting the character t
o display on the LCD continues. S/C = 1: display shift, S/C = 0:
No shift, R/L = 1: right, R/L = 0: left
6. The control settings of the LCD. 4-bit/8-bit data and determin
es the settings such as font size. IF = 1: 8 bits, IF = 0: 4 bits, N
= 1: 2 line, N = 0: 1 line, F = 1: 5 × 10 font, F = 0: 5 × 7 font
7. specifies an address corresponding to the position to be displa
yed on the LCD.
Verilog implementation
• To run our code we have 4 Inputs and 5 Outputs.
• First, there are RESET and Clock can be entered by default in the FPGA, the KEY
and Mode_Switch as an input to select Mode are needed to control the Dot-
Matrix (same as previous labs).
• Then, the Dot-Matrix is used for the output. (LEDs and 7-Segments used same as
the previous labs).
Verilog implementation
Top Module of the LCD example indicated the Input/Output Ports
- top.v
Verilog implementation
Top Module of the LCD example indicated the Input/Output Ports
textlcd.v (top) Registers Declaration
State machine for control
• Simple Calculator Registers for getting the values IDLE
Insert_1stNumber
First_Number
Insert_OpCode
OpCode_Is
Insert_2ndNumber
Second_Number
Result_Is
Function to convert hexadecimal or decimal
to ASCII for LCD
Simple Calculator STATE MACHINE
Simple Calculator STATE MACHINE
Simple Calculator STATE MACHINE
Simple Calculator STATE MACHINE
Text LCD control related to Counter and Enable
Text LCD Mode control order
Text LCD control, according to the Mode
Verilog Behavioral Simulation
• To test the operation of the LCD Display and the functionality of our code we have to run
behavioral simulation as following steps:
• Define the IOs for the Design Under Test (DUT) to provide inputs and see the expected output on the
ISim waveform.
• We define the input in the testbench as register type, so we can provide our inputs for test.
• The output will be wire type, we cannot modify.
Homework
• Do the following exercise and explain your Verilog code with
simulation, and test on the FPGA.
• Run the LCD Project and display your name. (Hint: you have to convert ASCII
to Hexadecimal)
• Add more features to the simple calculator example.
Calculator design with lcd using fpga
Ad

More Related Content

What's hot (20)

ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
Dwight Sabio
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
UR11EC098
 
Vlsi design flow
Vlsi design flowVlsi design flow
Vlsi design flow
Rajendra Kumar
 
Pass transistor logic
Pass transistor logicPass transistor logic
Pass transistor logic
Tripurna Chary
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
Srikrishna Thota
 
Cpld fpga
Cpld fpgaCpld fpga
Cpld fpga
anishgoel
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
E2MATRIX
 
VLSI Fresher Resume
VLSI Fresher ResumeVLSI Fresher Resume
VLSI Fresher Resume
vikas kumar
 
Placement in VLSI Design
Placement in VLSI DesignPlacement in VLSI Design
Placement in VLSI Design
Team-VLSI-ITMU
 
vlsi design flow
vlsi design flowvlsi design flow
vlsi design flow
Anish Gupta
 
Logic Synthesis
Logic SynthesisLogic Synthesis
Logic Synthesis
VandanaPagar1
 
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
Complex Programmable Logic Device (CPLD) Architecture and Its ApplicationsComplex Programmable Logic Device (CPLD) Architecture and Its Applications
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
elprocus
 
ASIC DESIGN FLOW
ASIC DESIGN FLOWASIC DESIGN FLOW
ASIC DESIGN FLOW
Purvi Medawala
 
Rc delay modelling in vlsi
Rc delay modelling in vlsiRc delay modelling in vlsi
Rc delay modelling in vlsi
Dr. Vishal Sharma
 
Architecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP ProcessorArchitecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP Processor
Janelle Martinez
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
Diwaker Pant
 
Fan-in and Fan-out.ppt
Fan-in and Fan-out.pptFan-in and Fan-out.ppt
Fan-in and Fan-out.ppt
vsnishok
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
JITU MISTRY
 
CMOS Logic
CMOS LogicCMOS Logic
CMOS Logic
Sudhanshu Janwadkar
 
MAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERSMAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERS
Bhamidipati Gayatri
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
UR11EC098
 
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdfDEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
DEVELOPMENT TOOLS FOR MICROCONTROLLERS.pdf
Srikrishna Thota
 
Verilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with ExamplesVerilog Tutorial - Verilog HDL Tutorial with Examples
Verilog Tutorial - Verilog HDL Tutorial with Examples
E2MATRIX
 
VLSI Fresher Resume
VLSI Fresher ResumeVLSI Fresher Resume
VLSI Fresher Resume
vikas kumar
 
Placement in VLSI Design
Placement in VLSI DesignPlacement in VLSI Design
Placement in VLSI Design
Team-VLSI-ITMU
 
vlsi design flow
vlsi design flowvlsi design flow
vlsi design flow
Anish Gupta
 
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
Complex Programmable Logic Device (CPLD) Architecture and Its ApplicationsComplex Programmable Logic Device (CPLD) Architecture and Its Applications
Complex Programmable Logic Device (CPLD) Architecture and Its Applications
elprocus
 
Architecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP ProcessorArchitecture Of TMS320C50 DSP Processor
Architecture Of TMS320C50 DSP Processor
Janelle Martinez
 
Pass Transistor Logic
Pass Transistor LogicPass Transistor Logic
Pass Transistor Logic
Diwaker Pant
 
Fan-in and Fan-out.ppt
Fan-in and Fan-out.pptFan-in and Fan-out.ppt
Fan-in and Fan-out.ppt
vsnishok
 
Delays in verilog
Delays in verilogDelays in verilog
Delays in verilog
JITU MISTRY
 
MAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERSMAC UNIT USING DIFFERENT MULTIPLIERS
MAC UNIT USING DIFFERENT MULTIPLIERS
Bhamidipati Gayatri
 

Viewers also liked (20)

FPGA Tutorial - LCD Interface
FPGA Tutorial - LCD InterfaceFPGA Tutorial - LCD Interface
FPGA Tutorial - LCD Interface
Politeknik Elektronika Negeri Surabaya
 
Fpga creating counter with internal clock
Fpga   creating counter with internal clockFpga   creating counter with internal clock
Fpga creating counter with internal clock
Politeknik Elektronika Negeri Surabaya
 
Uart
UartUart
Uart
cs1090211
 
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Rahul Borthakur
 
Dsp Based Field Programable Gate Array
Dsp Based Field Programable Gate ArrayDsp Based Field Programable Gate Array
Dsp Based Field Programable Gate Array
decebems
 
Spartan 3e用户手册
Spartan 3e用户手册Spartan 3e用户手册
Spartan 3e用户手册
zhaojk90
 
Spartan-3A/3AN FPGA Starter Kit Board User Guide
Spartan-3A/3AN  FPGA Starter Kit  Board User GuideSpartan-3A/3AN  FPGA Starter Kit  Board User Guide
Spartan-3A/3AN FPGA Starter Kit Board User Guide
Remmy Fuentes Telleria
 
Acceleration of stochastic algorithm on fpga system
Acceleration of stochastic algorithm on fpga systemAcceleration of stochastic algorithm on fpga system
Acceleration of stochastic algorithm on fpga system
Sheela Arokia Mary
 
Implementation of Soft-core Processor on FPGA
Implementation of Soft-core Processor on FPGAImplementation of Soft-core Processor on FPGA
Implementation of Soft-core Processor on FPGA
Deepak Kumar
 
Adobe Education Exchange Spotlight : Float! A global collaborative project f...
Adobe Education Exchange Spotlight :  Float! A global collaborative project f...Adobe Education Exchange Spotlight :  Float! A global collaborative project f...
Adobe Education Exchange Spotlight : Float! A global collaborative project f...
Matt Cauthron
 
Public Seminar_Final 18112014
Public Seminar_Final 18112014Public Seminar_Final 18112014
Public Seminar_Final 18112014
Hossam Hassan
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)
Deepak Kumar
 
multi standard multi-band receivers for wireless applications
multi standard  multi-band receivers for wireless applicationsmulti standard  multi-band receivers for wireless applications
multi standard multi-band receivers for wireless applications
Hossam Hassan
 
On Being A Successful Graduate Student In The Sciences
On Being A Successful Graduate Student In The SciencesOn Being A Successful Graduate Student In The Sciences
On Being A Successful Graduate Student In The Sciences
Hossam Hassan
 
Project presentation1
Project presentation1Project presentation1
Project presentation1
Antonio Mondragon
 
FPGA workshop
FPGA workshopFPGA workshop
FPGA workshop
Alex Borisevich
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
Hossam Hassan
 
Mp3
Mp3Mp3
Mp3
Shirley Aranjo
 
Verilog Tasks and functions
Verilog Tasks and functionsVerilog Tasks and functions
Verilog Tasks and functions
Vinchipsytm Vlsitraining
 
Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrum
Hossam Hassan
 
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Designing of 8 BIT Arithmetic and Logical Unit and implementing on Xilinx Ver...
Rahul Borthakur
 
Dsp Based Field Programable Gate Array
Dsp Based Field Programable Gate ArrayDsp Based Field Programable Gate Array
Dsp Based Field Programable Gate Array
decebems
 
Spartan 3e用户手册
Spartan 3e用户手册Spartan 3e用户手册
Spartan 3e用户手册
zhaojk90
 
Spartan-3A/3AN FPGA Starter Kit Board User Guide
Spartan-3A/3AN  FPGA Starter Kit  Board User GuideSpartan-3A/3AN  FPGA Starter Kit  Board User Guide
Spartan-3A/3AN FPGA Starter Kit Board User Guide
Remmy Fuentes Telleria
 
Acceleration of stochastic algorithm on fpga system
Acceleration of stochastic algorithm on fpga systemAcceleration of stochastic algorithm on fpga system
Acceleration of stochastic algorithm on fpga system
Sheela Arokia Mary
 
Implementation of Soft-core Processor on FPGA
Implementation of Soft-core Processor on FPGAImplementation of Soft-core Processor on FPGA
Implementation of Soft-core Processor on FPGA
Deepak Kumar
 
Adobe Education Exchange Spotlight : Float! A global collaborative project f...
Adobe Education Exchange Spotlight :  Float! A global collaborative project f...Adobe Education Exchange Spotlight :  Float! A global collaborative project f...
Adobe Education Exchange Spotlight : Float! A global collaborative project f...
Matt Cauthron
 
Public Seminar_Final 18112014
Public Seminar_Final 18112014Public Seminar_Final 18112014
Public Seminar_Final 18112014
Hossam Hassan
 
Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)Implementation of Soft-core processor on FPGA (Final Presentation)
Implementation of Soft-core processor on FPGA (Final Presentation)
Deepak Kumar
 
multi standard multi-band receivers for wireless applications
multi standard  multi-band receivers for wireless applicationsmulti standard  multi-band receivers for wireless applications
multi standard multi-band receivers for wireless applications
Hossam Hassan
 
On Being A Successful Graduate Student In The Sciences
On Being A Successful Graduate Student In The SciencesOn Being A Successful Graduate Student In The Sciences
On Being A Successful Graduate Student In The Sciences
Hossam Hassan
 
An introduction to digital signal processors 1
An introduction to digital signal processors 1An introduction to digital signal processors 1
An introduction to digital signal processors 1
Hossam Hassan
 
Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrum
Hossam Hassan
 
Ad

Similar to Calculator design with lcd using fpga (20)

Moving message display
Moving message displayMoving message display
Moving message display
viraj1989
 
LCD Interacing with 8051
LCD Interacing with 8051LCD Interacing with 8051
LCD Interacing with 8051
Sudhanshu Janwadkar
 
Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051
Hasnain Yaseen
 
Interfacing with LCD
Interfacing with LCDInterfacing with LCD
Interfacing with LCD
Ariel Tonatiuh Espindola
 
LCD WITH 8051.docx
LCD WITH 8051.docxLCD WITH 8051.docx
LCD WITH 8051.docx
bhattparthiv23
 
Lcd & keypad
Lcd & keypadLcd & keypad
Lcd & keypad
Izwanizam Yahaya
 
Dot matrix display design using fpga
Dot matrix display design using fpgaDot matrix display design using fpga
Dot matrix display design using fpga
Hossam Hassan
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
NIT Raipur
 
Analog to Digital Converter
Analog to Digital ConverterAnalog to Digital Converter
Analog to Digital Converter
Ariel Tonatiuh Espindola
 
THERMOMETER_963258_DIGITAL THERMOMETER.pptx
THERMOMETER_963258_DIGITAL THERMOMETER.pptxTHERMOMETER_963258_DIGITAL THERMOMETER.pptx
THERMOMETER_963258_DIGITAL THERMOMETER.pptx
sahulipunku2001
 
report cs
report csreport cs
report cs
Khawaja Mohtisham Ali
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
Pallavi Bharti
 
Microcontroller part 4
Microcontroller part 4Microcontroller part 4
Microcontroller part 4
Keroles karam khalil
 
Lcd
LcdLcd
Lcd
deepak281292
 
CLC and SLC with examples.pptx
CLC and SLC with examples.pptxCLC and SLC with examples.pptx
CLC and SLC with examples.pptx
AhmedLakhwera
 
Lcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.pptLcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.ppt
SoumyaGupta836456
 
Microprocessors and Microcontrollers ppt
Microprocessors and Microcontrollers pptMicroprocessors and Microcontrollers ppt
Microprocessors and Microcontrollers ppt
pradeepA32
 
Embedded C Programming Module 7 Presentation
Embedded C Programming Module 7 PresentationEmbedded C Programming Module 7 Presentation
Embedded C Programming Module 7 Presentation
MarkkandanS
 
pandu-vivek (1)
pandu-vivek (1)pandu-vivek (1)
pandu-vivek (1)
Vivek Shukla
 
Basic of Firmware & Embedded Software Programming in C
Basic of Firmware & Embedded Software Programming in CBasic of Firmware & Embedded Software Programming in C
Basic of Firmware & Embedded Software Programming in C
Kapil Thakar
 
Moving message display
Moving message displayMoving message display
Moving message display
viraj1989
 
Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051Lcd interfacing with microprocessor 8051
Lcd interfacing with microprocessor 8051
Hasnain Yaseen
 
Dot matrix display design using fpga
Dot matrix display design using fpgaDot matrix display design using fpga
Dot matrix display design using fpga
Hossam Hassan
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
NIT Raipur
 
THERMOMETER_963258_DIGITAL THERMOMETER.pptx
THERMOMETER_963258_DIGITAL THERMOMETER.pptxTHERMOMETER_963258_DIGITAL THERMOMETER.pptx
THERMOMETER_963258_DIGITAL THERMOMETER.pptx
sahulipunku2001
 
Industrial training report of embedded system and robotics
Industrial training report of embedded system and roboticsIndustrial training report of embedded system and robotics
Industrial training report of embedded system and robotics
Pallavi Bharti
 
CLC and SLC with examples.pptx
CLC and SLC with examples.pptxCLC and SLC with examples.pptx
CLC and SLC with examples.pptx
AhmedLakhwera
 
Lcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.pptLcd interface with atmega32 avr best.ppt
Lcd interface with atmega32 avr best.ppt
SoumyaGupta836456
 
Microprocessors and Microcontrollers ppt
Microprocessors and Microcontrollers pptMicroprocessors and Microcontrollers ppt
Microprocessors and Microcontrollers ppt
pradeepA32
 
Embedded C Programming Module 7 Presentation
Embedded C Programming Module 7 PresentationEmbedded C Programming Module 7 Presentation
Embedded C Programming Module 7 Presentation
MarkkandanS
 
Basic of Firmware & Embedded Software Programming in C
Basic of Firmware & Embedded Software Programming in CBasic of Firmware & Embedded Software Programming in C
Basic of Firmware & Embedded Software Programming in C
Kapil Thakar
 
Ad

More from Hossam Hassan (8)

Software hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq socSoftware hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq soc
Hossam Hassan
 
An Ultra-Low Power Asynchronous-Logic
An Ultra-Low Power Asynchronous-LogicAn Ultra-Low Power Asynchronous-Logic
An Ultra-Low Power Asynchronous-Logic
Hossam Hassan
 
Introduction to digital signal processing 2
Introduction to digital signal processing 2Introduction to digital signal processing 2
Introduction to digital signal processing 2
Hossam Hassan
 
Introduction to fpga synthesis tools
Introduction to fpga synthesis toolsIntroduction to fpga synthesis tools
Introduction to fpga synthesis tools
Hossam Hassan
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
Hossam Hassan
 
NoC simulators presentation
NoC simulators presentationNoC simulators presentation
NoC simulators presentation
Hossam Hassan
 
Search algorithms master
Search algorithms masterSearch algorithms master
Search algorithms master
Hossam Hassan
 
hot research topics
hot research topicshot research topics
hot research topics
Hossam Hassan
 
Software hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq socSoftware hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq soc
Hossam Hassan
 
An Ultra-Low Power Asynchronous-Logic
An Ultra-Low Power Asynchronous-LogicAn Ultra-Low Power Asynchronous-Logic
An Ultra-Low Power Asynchronous-Logic
Hossam Hassan
 
Introduction to digital signal processing 2
Introduction to digital signal processing 2Introduction to digital signal processing 2
Introduction to digital signal processing 2
Hossam Hassan
 
Introduction to fpga synthesis tools
Introduction to fpga synthesis toolsIntroduction to fpga synthesis tools
Introduction to fpga synthesis tools
Hossam Hassan
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
Hossam Hassan
 
NoC simulators presentation
NoC simulators presentationNoC simulators presentation
NoC simulators presentation
Hossam Hassan
 
Search algorithms master
Search algorithms masterSearch algorithms master
Search algorithms master
Hossam Hassan
 

Recently uploaded (20)

Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...
Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...
Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...
Journal of Soft Computing in Civil Engineering
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Using the Artificial Neural Network to Predict the Axial Strength and Strain ...
Journal of Soft Computing in Civil Engineering
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
JRR Tolkien’s Lord of the Rings: Was It Influenced by Nordic Mythology, Homer...
Reflections on Morality, Philosophy, and History
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
Guru Nanak Technical Institutions
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic AlgorithmDesign Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Design Optimization of Reinforced Concrete Waffle Slab Using Genetic Algorithm
Journal of Soft Computing in Civil Engineering
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Construction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil EngineeringConstruction Materials (Paints) in Civil Engineering
Construction Materials (Paints) in Civil Engineering
Lavish Kashyap
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Personal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.pptPersonal Protective Efsgfgsffquipment.ppt
Personal Protective Efsgfgsffquipment.ppt
ganjangbegu579
 
Lecture - 7 Canals of the topic of the civil engineering
Lecture - 7  Canals of the topic of the civil engineeringLecture - 7  Canals of the topic of the civil engineering
Lecture - 7 Canals of the topic of the civil engineering
MJawadkhan1
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Machine foundation notes for civil engineering students
Machine foundation notes for civil engineering studentsMachine foundation notes for civil engineering students
Machine foundation notes for civil engineering students
DYPCET
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 

Calculator design with lcd using fpga

  • 1. Chapter:10 Calculator Design with LCD Using FPGA By: Hossam Hassan PhD Student, MSIS Lab, Chungbuk National University MSIS
  • 2. Objectives • In this lab we will deal with the LCD (Liquid Crystal Display) display which as dot-matrix used to display information on many devices. • We will write Verilog code to implement a basic calculator and show the results on the LCD display then simulate how to drive LCD display and synthesis the code to run on FPGA board. • We will consider the following code for the calculator operation: Binary Code Operation 000 Nothing to do 001 + 010 - 011 * 100 / 101 = 110 ~ 111 Nothing to do
  • 3. Objectives • Our design for simple calculator will be as following: • Enter your First digit (Only One Digit) • Select Arithmetic Operation (+,-,/,*) • Enter your Second digit (Only One Digit) • The result is ………….
  • 4. Introduction • Text LCD modules are cheap and easy to interface using a microcontroller or FPGA. • LCDs are used in a wide range of applications including computer monitors, televisions, instrument panels, aircraft cockpit displays, and signage. • They are common in consumer devices such as DVD players, gaming devices, clocks, watches, calculators, and telephones, and have replaced cathode ray tube (CRT) displays in most applications. • An LCD is made with either a passive matrix or an active matrix display grid. • The passive matrix LCD has a grid of conductors with pixels located at each intersection in the grid. • A current is sent across two conductors on the grid to control the light for any pixel. • The active matrix LCD is also known as a thin film transistor (TFT) display. • An active matrix has a transistor located at each pixel intersection, requiring less current to control the luminance of a pixel. For this reason, the current in an active matrix display can be switched on and off more frequently, improving the screen refresh time.
  • 5. Introduction • A simplified scheme of time multiplexing with passive matrix displays is shown in Figure. • A short pulse is applied periodically to the rows as a strobe signal, whereas the columns carry the information signals. • A pixel is only selected if a difference in potential (and, therefore, an electrical field) is present, that is, only if the row and column are not on a low or high level at the same time.
  • 6. Text LCD module • Let's drive the LCD module from an FPGA board. • Text-LCD module is in the form of a one controller and the LCD Panel. • You have to transmit the data via the data bus, the controller can obtain desired display. • The figure below shows the internal structure of a LCD module.
  • 7. Text LCD module • LCD controlled via a control lines: • E (module selection signal Enable): command to enable the LCD, this should be the first pin to the action, such as rea ding or writing data. • RS (internal register selection): a command input and the output of the inner pin is used to select one of the memory . RS is 0 (read mode), RS is 1 (write mode). • R/W (input / output selection): is used to select the data read and write data. If the R / W is 0 and the data write, R / W is 1, the data read state. • DB0 ~ DB7 sending and receiving data through the 8-bit data bus of LCD controller • Vdd and Vss are the module voltage that operates on + 5V power supply.
  • 8. Text LCD module • Table provides a summary of the features and a control signal for use with an LCD. (For More information refer to the manual) 1. Clears the screen. 2. Move the cursor to the position (Home) on the upper-left. 3. The character output decide whether to go forward to go back one character. I/D = 1: increases, I/D = 0 decreases, S = 1: Acco mpanies display shift 4. The display ON/OFF, the cursor of the ON/OFF, a cursor blink ON/OFF determination D = 1: Screen ON, C = 1: cursor ON, B = 1: flashing ON 5. determining a direction in case of transmitting the character t o display on the LCD continues. S/C = 1: display shift, S/C = 0: No shift, R/L = 1: right, R/L = 0: left 6. The control settings of the LCD. 4-bit/8-bit data and determin es the settings such as font size. IF = 1: 8 bits, IF = 0: 4 bits, N = 1: 2 line, N = 0: 1 line, F = 1: 5 × 10 font, F = 0: 5 × 7 font 7. specifies an address corresponding to the position to be displa yed on the LCD.
  • 9. Verilog implementation • To run our code we have 4 Inputs and 5 Outputs. • First, there are RESET and Clock can be entered by default in the FPGA, the KEY and Mode_Switch as an input to select Mode are needed to control the Dot- Matrix (same as previous labs). • Then, the Dot-Matrix is used for the output. (LEDs and 7-Segments used same as the previous labs).
  • 10. Verilog implementation Top Module of the LCD example indicated the Input/Output Ports - top.v
  • 11. Verilog implementation Top Module of the LCD example indicated the Input/Output Ports textlcd.v (top) Registers Declaration
  • 12. State machine for control • Simple Calculator Registers for getting the values IDLE Insert_1stNumber First_Number Insert_OpCode OpCode_Is Insert_2ndNumber Second_Number Result_Is
  • 13. Function to convert hexadecimal or decimal to ASCII for LCD
  • 18. Text LCD control related to Counter and Enable
  • 19. Text LCD Mode control order
  • 20. Text LCD control, according to the Mode
  • 21. Verilog Behavioral Simulation • To test the operation of the LCD Display and the functionality of our code we have to run behavioral simulation as following steps: • Define the IOs for the Design Under Test (DUT) to provide inputs and see the expected output on the ISim waveform. • We define the input in the testbench as register type, so we can provide our inputs for test. • The output will be wire type, we cannot modify.
  • 22. Homework • Do the following exercise and explain your Verilog code with simulation, and test on the FPGA. • Run the LCD Project and display your name. (Hint: you have to convert ASCII to Hexadecimal) • Add more features to the simple calculator example.
  翻译: