LCD's 1. LCD Types Many types available. Most common are:  Character Pre-programmed with a set of alphanumeric characters & symbols Size range from 8×1.

Slides:



Advertisements
Similar presentations
Variables in C Amir Haider Lecturer.
Advertisements

Intro to WinHex CSC 414.
CSC141- Introduction to Computer Programming
Simulation executable (simv)
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.
Information Representation
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.
Technology ICT Option: Data Representation. Data Representation In our everyday lives, we communicate with each other using analogue data. This data takes.
I/O: SPARC Assembly Department of Computer Science Georgia State University Georgia State University Updated Spring 2014.
Lecture 20 Arrays and Strings
What is a pointer? First of all, it is a variable, just like other variables you studied So it has type, storage etc. Difference: it can only store the.
Module R2 Overview. Process queues As processes enter the system and transition from state to state, they are stored queues. There may be many different.
Image Data Representations and Standards
LCM Introduction Excel Technology International Corporation.
Working with the data type: char  2000 Prentice Hall, Inc. All rights reserved. Modified for use with this course. Introduction to Computers and Programming.
Overview of C++ Chapter 2 in both books programs from books keycode for lab: get Program 1 from web test files.
ASPPRATECH.
Embedded Programming and Robotics Lesson 9 Keypad and LCD Display 1.
Introduction to Array The fundamental unit of data in any MATLAB program is the array. 1. An array is a collection of data values organized into rows and.
Sales Meeting December-04 TFTs Basic Concepts. TFTs Basic Concepts.
16x2 LCD Module on DE2-115 數位電路實驗 TA: 吳柏辰 Author: Trumen.
Introduction to display technologies Jean-Michel Lechevallier.
TextWand Programmable LED Display Carlos Vila-Virella and Andy Campanella.
Digital Outputs LCD Display
Programmable Logic Controllers
Computers Organization & Assembly Language
ECE291 Computer Engineering II Lecture 9 Josh Potts University of Illinois at Urbana- Champaign.
Introduction to Robo Pro
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Forging new generations of engineers
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 12: Pointers continued, C strings.
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
UniMAP 1 Interfacing Peripherals. UniMAP 2 Interfacing devices on Embedded Linux In general, to interface to a device connected to an embedded Linux platform.
Character Generation.
Fundamentals of C and C++ Programming. EEL 3801 – Lotzi Bölöni Sub-Topics  Basic Program Structure  Variables - Types and Declarations  Basic Program.
Introduction to Pascal The Basics of Program writing.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
Data Representation The storage of Text Numbers Graphics.
Chapter 10 Glass Bliss Using the Parallel Master Port to communicate with Alphanumeric LCD displays.
Road map char data type Reading –Liang 5: Chapter 2: 2.7.4; 2.9; –Liang 6: Chapter 2: 2.7.4; 2.9 –Liang 7: Chapter 2: 2.7.4; 2.9.
How Computers Work Part 3 18 February Data Types  Computer doesn’t know what the bits represents or what format is being used  Computer assumes.
Department of Electronic & Electrical Engineering LCD character display (parallel interface). How to interface a LCD character display to a PIC.
Introduction to Java Applications Part II. In this chapter you will learn:  Different data types( Primitive data types).  How to declare variables?
WORKING WITH SELECTIONS MASKS and CHANNELS 3D IMAGES LAYER BASICS PHOTO.
Characters and Strings
Arrays in MIPS Assembly Computer Organization and Assembly Language: Module 6.
ECE 447 Fall 2009 Lecture 12: TI MSP430 External LCD.
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
C Programming Day 2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/LA07/003 Version No. 1.0 Union –mechanism to create user defined data types.
Vishwakarma government engineering college Prepare by. Hardik Jolapara( ) LCD Interfacing with ATmega16.
INTRODUCTION TO PROGRAMING System Development Mansoura October 2015.
LED AND KEYBOARD INTERFACING PREPARED BY :- PREPARED BY :- RAVAL AKASH ( ) RAVAL AKASH ( ) PATEL HARDIK ( ) PATEL HARDIK.
Arduino Programming Part 6: LCD Panel Output ME 121 Portland State University.
CEng3361 CENG 336 INT. TO EMBEDDED SYSTEMS DEVELOPMENT Spring 2011 Recitation 06.
Lec 3: Data Representation
Display Devices 16 x 2 lcd display.
Format of Assembly language
LCD and Keyboard Interfacing
Other Kinds of Arrays Chapter 11
What to bring: iCard, pens/pencils (They provide the scratch paper)
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
EET 2261 Unit 11 Controlling LCD and Keypad
LCD and Keyboard Interfacing
LCD and Keyboard Interfacing
LCD and Keyboard Sepehr Naimi
LCD and Keyboard Interfacing
LCD (LIQUID CRISTAL DISPLAY) SCREENS
ECE 120 Midterm 1 HKN Review Session.
Presentation transcript:

LCD's 1

LCD Types Many types available. Most common are:  Character Pre-programmed with a set of alphanumeric characters & symbols Size range from 8×1 to 40×4 (characters)  Graphic Either graphic only (set each pixel individually ), or both graphic & character modes Common sizes (pixels) 128×64, 240×128, 320×240 (QVGA) etc.. 4-2

LCD backlights & Display properties Backlights  CCFL (needs converter), LED & OLED (no backlight required) Display properties  Reflective,Transmissive, Transflective (better in sunlight) 4-3

LCD polarizer 4-4 Reflective displays have an opaque rear polarizer that includes a diffuse reflector, such as brushed aluminum. This layer reflects polarized ambient light that has entered the front of the display back trough the LCD cell. Reflective displays require ambient light to be seen. They exhibit high brightness, excellent contrast, and wide viewing angles. They are particularly suitable for use in battery operated equipment where an adequate level of light is always available. Reflective LCD's cannot be backlit, however they can be front lighted in some applications. Transmissive displays have a clear polarizer on the front and the back. The display therefore depends on light coming through from the back of the display toward the observer in order to be seen. Most, but not all transmissive displays are negative image, and we sometimes add colored filters to different areas of the display to highlight different annunciators. Another example of a transmissive polarizer display would be a transparent window where you could see the segments superimposed over your line of vision through the display window (this assumes a sufficient ambient light source exists on either side of the window). Transflective displays have a rear polarizer which includes a translucent material which reflects part of the ambient light, and also transmits backlighting. As the name implies, it is a compromise between the transmissive and reflective viewing mode. Used in reflection, it is not as bright and has lower contrast than the reflective type LCD, but it can be backlit for use in low light conditions. This polarizer is the best selection for a display that can be used in all lighting conditions with a backlight. Source -

LCD Pin assignments 4-5

LCD Driver Block Diagram 4-6

LCD on the MCB23XX Boards Keil MCB23xx uses 4 bit mode! 4-7 LCD Pins LPC23XX pins - DB4 = P DB5 = P DB6 = P DB7 = P E = P1.31 (for V1 P1.30) - RW = P RS = P1.28

Commands for character modules 4-8 RSR/WDB7DB6DB5DB4DB3DB2DB1DB0 Function set DL N F* #

4 Bit initialization 4-9 LCD_RS(0) /* Instruction input*/ lcd_write_4bit (0x3); /* Set LCD in known state */ delay (4100); /* Write 0x3 × 3 */ lcd_write_4bit (0x3); delay (100); lcd_write_4bit (0x3); lcd_write_4bit (0x2); /* Select 4-bit interface */ lcd_write_cmd (0x28); /* 2 lines, 5x8 character matrix*/ lcd_write_cmd (0x0C); // Dsplayn cntrl:Disp=ON,Curs/Blk=OFF lcd_write_cmd (0x06); /* Entry mode: Move right, no shift */

DISPLAY CHARACTER POSITION AND CHARACTER ADDRESS 4-10

LCD Functions User functions - call these from your program (function prototypes are in the lcd header file!)  void lcd_init (void);  void lcd_clear (void);  void lcd_putchar (char c);  void set_cursor (unsigned char column, unsigned char line);  void lcd_print (unsigned char const *string); 4-11 lcd_init(); lcd_clear(); lcd_print (" Embedded Systems"); set_cursor (0, 1); lcd_print (" Alan ");  Extract from sample program

Low level non user LCD functions Also a number of low level functions that are called from the user functions see the lcd.c file.  void lcd_write_cmd (unsigned char c)  void lcd_write_4bit (unsigned char c)  static unsigned char wait_while_busy (void)  static unsigned char lcd_read_status (void) 4-12 void lcd_write_cmd (unsigned char c) { wait_while_busy(); LCD_RS(0) lcd_write_4bit (c>>4); lcd_write_4bit (c); }

Printing variables to the LCD To print variables to the LCD it is necessary to convert the variable to its ASCII character representation using the sprintf() function and then printing out the characters using the lcd_print() function.  Example sprintf(lcd_buf, "%d", x);//convert x to ASCII lcd_print(lcd_buf);// print to LCD where the variable x is an integer to be printed in decimal (hence the %d in the sprintf format string) and lcd_buf is an array of char declared big enough to hold the characters of the number + 1 extra character (for the end of string NULL character). E.g. char lcd_buf[17]; // LCD buffer big enough for one line of characters on the LCD 4-13

LCD Character generation User defines characters can be stored in the LCD CGRAM memory Up to 8 characters can be stored 4-14

LCD CG RAM Example 4-15 /* Load user-specific characters into CGRAM */ lcd_write_cmd(0x40); /* Set CGRAM address counter to 0 */ p = &UserFont[0][0]; for (i = 0; i < sizeof(UserFont); i++, p++) lcd_putchar (*p); lcd_write_cmd(0x80); /* Set DDRAM address counter to 0 */ /* 8 user defined characters to be loaded into CGRAM (used for bargraph) */ const unsigned char UserFont[8][8] = { { 0x00,0x0A,0x00,0x00,0x11,0x0e,0x00,0x00 }, { 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10 }, { 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18 }, { 0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C,0x1C }, { 0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E,0x1E }, { 0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F,0x1F }, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 } };

LCD CG RAM Example Our character has been defined at address 0x00; Therefore to display the user defined character simply use the lcd_putchar function lcd_putchar (0x00);

LCD simulation in uVision Add the file Sim.ini to the directory of your current project. In the Options for target simulator (magic wand icon) select the debug tab. 4-17

LCD simulation in uVision Add the file Sim.ini as the Initialization file in the left hand panel for the simulator options using the file browser icon. 4-18

LCD simulation in uVision The Sim.ini maps the LCD write address to 0x in memory. By viewing address 0x in the memory window it is possible to simulate the display of the LCD. 4-19

LCD simulation in uVision 4-20 Change display format to Ascii