LCD (LIQUID CRISTAL DISPLAY) SCREENS

Slides:



Advertisements
Similar presentations
Lab 12 : Liquid Crystal Displays: Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 DMD Basics : Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Data Write the.
Advertisements

DOS and BIOS Interrupts DOS and BIOS interrupts are used to perform some very useful functions, such as displaying data to the monitor, reading data from.
Programming In C++ Spring Semester 2013 Lecture 8 Programming In C++, Lecture 8 By Umer Rana.
Bits and Bytes + Controlling 8 LED with 3 Pins Binary Counting and Shift Registers.
Embedded Programming and Robotics Lesson 9 Keypad and LCD Display 1.
16x2 LCD Module on DE2-115 數位電路實驗 TA: 吳柏辰 Author: Trumen.
Parallax 4x20 LCD (part number 27979) with Arduino Duemilanove
Overview What kind of LCD Interfacing the LCD Displaying Text and Numbers Common Issues.
Digital Outputs LCD Display
HD44780 LCD programming From the Hardware Side
ORG ; FOUR INT 21H and INT 10H Programming and Macros Dec Hex Bin
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
Practical Electronics & Programming
Week 1 Algorithmization and Programming Languages.
GCSE ICT Storing data - Internal memory, backing storage, and measuring memory.
Programming Fundamentals. Overview of Previous Lecture Phases of C++ Environment Program statement Vs Preprocessor directive Whitespaces Comments.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
Programming Fundamentals. Summary of previous lectures Programming Language Phases of C++ Environment Variables and Data Types.
BM-305 Mikrodenetleyiciler Güz 2015 (10. Sunu) (Yrd. Doç. Dr. Deniz Dal)
Hardware: Input and Processing. Input and Processing Technology Hardware devices can be grouped according to how and where they are used in the four steps.
Department of Electronic & Electrical Engineering LCD character display (parallel interface). How to interface a LCD character display to a PIC.
Lecture 11 Text mode video
Project Assignment Snake Game/Car Acceleration Meter Min 10 Pages 10 min Presentation Max 5 group members Submitting Date: lab 2:Dec 27, 2014 Lab 3: Dec.
Lesson 6 Binary Understand what Binary Code means and apply this knowledge Understand how data is represented using bit systems and be able to change decimal.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
Constants, Data Types and Variables
LCD AND LCD INTERFACING. INDEX:-  INTRODUCTION  PIN DISCRIPTION  INITIALIZATION OF LCD  LCD INTERFACING  LCD INTERFACING WITH ATMEGA 32  INTERFACING.
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
Chapter 5 - Internal Memory 5.1 Semiconductor Main Memory 5.2 Error Correction 5.3 Advanced DRAM Organization.
Using a SparkFun™ serial LCD with an Arduino
Computer Organization
Michael Rahaim, PhD Candidate Multimedia Communications Lab
Scrolling LCD using Arduino.
Lab 2: Arduino Sensors Topics: Arduino Sensor Reading, Display
Peripherals – Keypad The Keypad provides a simple means of numerical data or control input. The keys can be attributed whatever data or control values.
LCD Interfacing using Atmega 32
Chapter Topics The Basics of a C++ Program Data Types
ARDUINO BASED AUTOMATIC TEMPERATURE BASED FAN SPEED CONTROLLER
Display Devices 16 x 2 lcd display.
CS4101 Introduction to Embedded Systems Lab 10: Tasks and Scheduling
Computer Hardware – System Unit
Microcontroller basics
LCD and Keyboard Interfacing
Storage Hardware This icon indicates the slide contains activities created in Flash. These activities are not editable. For more detailed instructions,
UNIVERSAL COLLEGE OF ENGINEERING & TECHNOLOGY
GANDHINAGAR INSTITUTE OF TECHNOLOGY
Basic Elements of C++.
DIGITAL CALCULATOR USING 8051
‘SONAR’ using Arduino & ultrasonic distance sensor
Microprocessor and Assembly Language
EET 2261 Unit 11 Controlling LCD and Keypad
Schedule 8:00-11:00 Workshop: Arduino Fundamentals
Basic Elements of C++ Chapter 2.
LCD and Keyboard Interfacing
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
I/O in C Lecture 6 Winter Quarter Engineering H192 Winter 2005
LCD and Keyboard Interfacing
LCD and Keyboard Sepehr Naimi
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
HD44780 LCD programming From the Hardware Side
HD44780 LCD programming From the Hardware Side
8051 Micro Controller.
LCD and Keyboard Interfacing
CTY SAR FCPS Shawn Lupoli, Elliot Tan
UNIT 1 First programs.
Variables and Constants
CTY SAR FCPS Vedant mathur, Juliana schalkwyk
Presentation transcript:

LCD (LIQUID CRISTAL DISPLAY) SCREENS UNIT 6 LCD (LIQUID CRISTAL DISPLAY) SCREENS

Aim and Agenda of unit 6 Explain basic ideas about LCD screens Take a look at the LCD screen as an output peripheral: it enables you to display any kind of output information including numbers, letters and symbols The aim of the presentation The agenda of the presentation Explain basic ideas about LCD screens Explain character set and graphics characters Present liquidCrystal.h library 2

LCD SCREENS This is an output peripheral that not only shows numbers but also all kinds of characters, texts, symbols and even simple graphics You’re going to use a 2 x 16 LCD screen LCD screen is a digital peripheral. Its signals can be connected directly to the controller’s input and output pins. They’re divided into three groups: Power supply Control Data 3

LCD SCREENS Have a look at the following table that contains a description of each pins PIN Nº NAME TYPE DESCRIPTION 1 Vss Voltage supply Ground power supply (0 V) 2 Vdd Positive +5 Vcc power supply 3 VLC Contrast adjustment: voltages alternating between 0 and +5 Vcc. 4 RS Input Output from the Arduino controller. Selects between instructions and data: RS=0 Arduino transfers instructions RS=1 Arduino transfers data (ASCII codes) 5 R/W Output from Arduino. Controls reading and writing: R/W=0 Arduino performs data write on the LCD screen R/W=1 Arduino performs data read of the LCD screen 6 E Output from Arduino. Enables the screen: E=0 LCD screen disabled (on high impedance) E=1 LCD screen enabled 7-14 DB0:DB7 Input/Output Data and instruction bus lines. Arduino transfers instructions or data to the screen according to the RS signal. The DB0:DB7 lines are used with an 8 bit interface The DB4:DB7 lines are used with an 4 bit interface 15 L+ Positive voltage for background light (+5 Vcc) 16 L- Negative voltage for background light (0 V) 4

The internal ROM memory contains the definition of each one THE CHARACHER SET Communication between Arduino and LCD screens is achieved basically through DB0-DB7 digital pins It sends the ASCII character codes that you want to display. These are 8 bit codes The internal ROM memory contains the definition of each one If you use an “8 bit interface”, Arduino needs only a single transfer to display each character “4 bit interface” needs two transfers to display each character 5

The LCD screen has an internal RAM memory called CGRAM to do this task THE GRAPHIC CHARACTERS You can create a total of up to eight graphic characters of 5 x 8 points or “pixels”, each character is numbered 0 to 7 and needs a total of 8 bytes to be defined. The LCD screen has an internal RAM memory called CGRAM to do this task The graphic characters are defined by inserting bytes into successive positions of the CGRAM memory The CGRAM is a volatile memory capable of storing a total of 64 bytes 6

We’re going to study the most representative and important functions THE LIQUIDCRYSTAL.H LIBRARY We’re going to study the most representative and important functions FUNCTION: LIQUIDCRYSTAL() This function creates a “LiquidCrystal” type variable and establishes the connections between the LCD screen and the Arduino controller LiquidCrystal var(RS,E,D4,D5,D6,D7); //For a 4 bit interface without R/W signal LiquidCrystal var(RS,RW,E,D4,D5,D6,D7); //For a 4 bit interface with R/W signal LiquidCrystal var(RS,E,D0,D1,D2,D3,D4,D5,D6,D7); //For an 8 bit interface without R/W signal LiquidCrystal var(RS,RW,E,D0,D1,D2,D3,D4,D5,D6,D7); //For an 8 bit interface with R/W signal var: the name for the variable assigned to the LCD screen that you’re going to control. RS: the Arduino pin connected to the screen RS signal. RW: the Arduino pin connected to the screen R/W signal (if it’s going to be used). E: the Arduino pin connected to the screen E signal. D0-D7: Arduino pins that are connected to the screen DB0-DB7 data lines. If there are no pins indicated for DB0-DB3, we assume a 4 bit interface and only employ DB4-DB7 signals. 7

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: BEGIN() This function starts up the LCD screen and assigns it the number of rows and the number of characters per row according to the model in question var.begin(c,f); var: this is the name that defines the screen in question (established in LyquidCrystal()). c: the number of columns. f: the number of rows. FUNCTION: SETCURSOR() This function positions the LCD screen cursor as desired. From then on the preceding characters will be displayed. var.begin(c,f); var: this is the name that defines the screen in question (established in LyquidCrystal()). c: the number of columns. f: the number of rows. 8

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: HOME() This function locates the cursor in the top left hand corner (position 0 of row 0) of the screen’s first position var.home(); var: this is the name that defines the screen in question (established in LyquidCrystal()). FUNCTION: CLEAR() This function clears the LCD screen and locates the cursor in the top left hand corner var.clear(); var: this is the name that defines the screen in question (established in LyquidCrystal()). 9

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: WRITE() This function writes a character in the cursor’s current position var.write(char); var: this is the name that defines the screen in question (established in LyquidCrystal()). char: the character to be displayed. FUNCTION: PRINT () This function prints on the LCD screen starting from the current position of the cursor var.print(data,base); var: this is the name that defines the screen in question (established in LyquidCrystal()). data: This is the data to be printed. This might be char, int, long, float or string. base: This is optional and shows the desired numerical base: BIN=Binary; DEC=Decimal (by default); OCT=Octal; HEX=Hexadecimal; or N=nº in decimals for floating-point numbers (2 by default). 10

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: CURSOR() This function displays the cursor on the LCD screen in its current position as an underscore (_) var.cursor(); var: this is the name that defines the screen in question (established in LyquidCrystal()). FUNCTION: NOCURSOR() This function hides the LCD cursor. var.noCursor(); var: this is the name that defines the screen in question (established in LyquidCrystal()). 11

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: BLINK() This function displays the LCD cursor on the screen in its current position as a solid intermittent symbol (▓). var.blink(); var: this is the name that defines the screen in question (established in LyquidCrystal()). FUNCTION: NOBLINK() This function hides the solid intermittent cursor ( ▓ ). var.noblink(); var: this is the name that defines the screen in question (established in LyquidCrystal()). 12

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: DISPLAY() This function connects the LCD screen and recovers the content displayed on it before noDisplay() was executed. var.display(); var: this is the name that defines the screen in question (established in LyquidCrystal()). FUNCTION: NODISPLAY() This function turns the LCD screen off without losing whatever content there may be on it or the cursor’s position var.noDisplay(); var: this is the name that defines the screen in question (established in LyquidCrystal()). 13

var.scrollDisplayLeft(); var.scrollDisplayRight(); THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: SCROLLDISPLAYLEFT() This function displaces the content (the text and the position of the cursor) displayed on the screen at any given moment one place to the left. var.scrollDisplayLeft(); var: this is the name that defines the screen in question (established in LyquidCrystal()). FUNCTION: SCROLLDISPLAYRIGHT() This function displaces the content (the text and the position of the cursor) displayed on the screen at any given moment one place to the right. var.scrollDisplayRight(); var: this is the name that defines the screen in question (established in LyquidCrystal()). 14

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: LEFTTORIGHT() This function automatically establishes which direction the cursor writes on the screen: from left to right. This means that the characters are written from left to right without affecting the ones that have already been written. var.LeftToRight (); var: this is the name that defines the screen in question (established in LyquidCrystal()). FUNCTION: RIGHTTOLEFT() This function reverses the direction the cursor writes on the screen: the right to left. This means that the characters are written from right to left without affecting the ones that have already been written. var.RightToLeft(); var: this is the name that defines the screen in question (established in LyquidCrystal()). 15

THE LIQUIDCRYSTAL.H LIBRARY FUNCTION: AUTOSCROLL() This function activates the scrolling or automatic display movement. Each time a character is sent to the screen this function displays it and then moves the rest of the contents one place. If the direction at the time is left to right (leftToRight()), the contents moves to the left. If the direction at the time is right to left (rightToLeft()), the content moves to the right. var.autoscroll(); var: this is the name that defines the screen in question (established in LyquidCrystal()). FUNCTION: NOAUTOSCROLL () This function deactivates the scrolling or automatic display movement. var.noAutoscroll(); var: this is the name that defines the screen in question (established in LyquidCrystal()). 16

UNIT 6 LCD (Liquid Cristal Display) screens Thank You