Objectives : 1) To study the typical design of a LCD module 2) To interface the digital display unit through parallel printer port using C# program.

Similar documents
Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

Lab Experiment 9: LCD Display

LCDs. Embedded Systems Interfacing. 20 September 2011

Parallel Display Specifications Revision 1.0

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

LCD. Configuration and Programming

LCD board. EB005

LCM NHD-0440AZ-FSW -FBW. User s Guide. (Liquid Crystal Display Character Module) RoHS Compliant FEATURES

LCM NHD-0440CI-YTBL. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD CI- Y- T- B- L-

LCD Module User Manual

LCD Module User Manual

Item Symbol Standard Unit Power voltage VDD-VSS Input voltage VIN VSS - VDD

DOT MATRIX CHARACTER LCD MODULE USER S MANUAL

Alphanumeric LCD display module 24 characters by 2 line. General description

Hitachi Europe Ltd. ISSUE : app026/1.0 APPLICATION NOTE DATE : 20/9/94

COG (Chip-on-Glass) Liquid Crystal Display Module

FPGA Interfacing of HD44780 Based LCD Using Delayed Finite State Machine (FSM)

SPECIFICATIONS FOR LCD MODULE

NHD-C0216CZ-FSW-FBW-3V3

Lab 3 LCD Mar

Chapter 4. Address. data. Input / Output Programming. Simplified Z80 System Architecture. Memory. program. data. Z80 I/O Programming

LMB202DBC LCD Module User Manual

DOT MATRIX CHARACTER LCD MODULE USER S MANUAL

USER S GUIDE ATM4004A

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

If the display shift operation is used on a 20 x 4 display, the addressing is shifted as follows:

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

16COM / 40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

unit: mm 3044B - QFP80A unit: mm QFP80D

中显液晶 技术资料 中显控制器使用说明书 2009年3月15日 北京市海淀区中关村大街32号和盛大厦811室 电话 86 010 52926620 传真 86 010 52926621 企业网站.zxlcd.com

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

16COM/40SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

Sitronix. ST7038i FEATURES GENERAL DESCRIPTION. Dot Matrix LCD Controller/Driver

The modules in this lab room are 4 line by 16 character display modules. The data sheet/users manual for the module is posted on My.Seneca.

16COM / 80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

MOPS/386A (P389) MOPS/MZ and MOPSlcdMZ (PMZ1) MOPS/520 (P489) DOT Matrix Display on PC/104 Products

OPTIONS & SELECTION GUIDES

JUL. 27, 2001 Version 1.0

SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

JE-AN ELECTRONICS CO.,LTD. Spec. No: WG240128A

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

SLCD1-IC Serial LCD Processor

34COM/60SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

M0121LB 222LHAR2 I1. Vacuum Fluorescent Display Module

SPECIFICATIONS FOR LCD MODULE

16COM/80SEG DRIVER & CONTROLLER FOR DOT MATRIX LCD

SPECIFICATIONS FOR LCD MODULE

ARM HOW-TO GUIDE Interfacing GLCD with LPC2148 ARM

DISPLAY DEVICES 20T202DA1J (Tentative) Page - 1 / 18 VACUUM FLUORESCENT DISPLAY MODULE

AZ DISPLAYS, INC. COMPLETE LCD SOLUTIONS SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

SPECIFICATIONS FOR LCD MODULE

QP-5515 DOT MATRIX LIQUID CRYSTAL DISPLAY MODULE USER S MANUAL. Distributed by:

TL0313. LCD driver IC. Apr VER 0.0. lsi. ( 5.5V Specification ) 65COM / 132SEG DRIVER & CONTROLLER FOR STN LCD. TOMATO LSI Inc.

DISPLAYTRONIC A DIVISION OF ZE XIAMEN SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

SC162A VER2.1 CONTENT. 1. General description

SSD1803. Product Preview. 100 x 34 STN LCD Segment / Common Mono Driver with Controller

M0120SD 201MDB1 1. Vacuum Fluorescent Display Module

UNIVERSITY OF CONNECTICUT. ECE 3411 Microprocessor Application Lab: Fall Quiz II

SPECIFICATIONS FOR LCD MODULE

LCD Module User Manual

SPECIFICATION SALES BY APPROVED BY CHECKED BY PREPARED BY. Crystalfontz America, Inc East Saltese Avenue Spokane Valley, WA

USING LEDs, LCDs. AND GLCDs IN MICROCONTROLLER PROJECTS. Dogan Ibrahim. Near East University, Cyprus WILEY. A John Wiley & Sons, Ltd.

DM1620. Parameter Dimension Unit

Newhaven Display International, Inc Galvin Ct. Elgin IL, Ph: Fax:

SPECIFICATIONS FOR LCD MODULE

Crystalfontz America, Inc.

SANKALCHAND PATEL COLLEGE OF ENGINEERING, VISNAGAR. ELECTRONICS & COMMUNICATION DEPARTMENT Question Bank- 1

User s Guide ATM1602B

ATMEGA32 MUSIC PLAYER

LCD Module Specification

DATA SHEET. PCF2113x LCD controller/driver INTEGRATED CIRCUITS Apr 04

VACUUM FLUORESCENT DISPLAY MODULE SPECIFICATION SPECIFICATION NO. : DS DATE OF ISSUE : Apr., 5, R E V I S I O N : May, 18, 2007

COMP2121: Microprocessors and Interfacing. I/O Devices (II)

Parallel Display Specifications Revision 1.1

NHD 0216KZW AB5. OLED Display Module

LINPO TECHNOLOGY LTD SPECIFICATIONS OF LCD MODULE

CALCULATOR APPLICATION

KS COM / 132 SEG DRIVER & CONTROLLER FOR STN LCD

Crystalfontz America, Inc.

LCD MODULE 1x mm INCL. CONTROLLER HD 44780

I. PANEL DESCRIPTION... 1

8. SED1565 Series. (Rev. 1.2)

Appendix A: Rack Specification Sheet

INTEGRATED CIRCUITS DATA SHEET. PCF2119x-2 LCD controllers/drivers. Product specification File under Integrated Circuits, IC12

Data Sheet. Tranma Alphanumeric dot matrix liquid crystal displays with backlighting ATTENTION

SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY

PCF2119x. 1. General description. 2. Features and benefits. LCD controllers/drivers

PCF2119x. 1. General description. 2. Features and benefits. LCD controllers/drivers

LCM NHD-0116AZ-FL-GBW. User s Guide. (Liquid Crystal Display Module) RoHS Compliant. For product support, contact NHD AZ- F- L- G- B- W-

LCD MODULE DEM TGH

Alpha-Numeric Display Pager MODEL :AL-A28. Gold Apollo Co., Ltd.

MBCF24204B03 技术手册 ( 完整版 ) DoYoung.net 原创技术资料 实物照片 机械参数表.

Dot Matrix LCD Controller Driver

Specification of Vacuum Fluorescent Display NORITAKE ITRON CORPORATION Sheet 1/19 DS25404

REV: PAGE: REVISION DESCRIPTION APPR: DATE: A ALL Released to production GRW 6/17/94

AZ DISPLAYS, INC. SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY DATE: July 1, Page 1 of 13

Using the HT16K33 in DVD Player Panel Applications

LCD MODULE 4x mm INCL. CONTROLLER SSD1803

S6B SEG / 65 COM DRIVER & CONTROLLER FOR STN LCD

Transcription:

Experiment 6 : Digital Display (Liquid Crystal Display) Objectives : 1) To study the typical design of a LCD module 2) To interface the digital display unit through parallel printer port using C# program. Materials and equipment: Microsoft Window with Visual Studio.NET 2008 DB-25 connector (male) Circuit board LCD module Introduction : Generally, there are two types of LCD modules, the graphics LCD module and the character LCD module. In this experiment, a 16 x 2 character LCD module is being used. LCD module is a low-power display device which incorporates a dot-matrix character generator, display controller and driver function into a single device. It features a 5 x 7 pixel or a 5 x 10 pixel character fonts which could be interface directly to either a 4-bit or 8-bit microprocessors. Figure 1 1. Display Data RAM (DDRAM) The LCD module can be configured to using either a single-line or two-line display mode. The LCD module consists of a display data RAM (DDRAM) which stores the characters for the display. The data in the display data RAM will reflect immediately on the LCD screen once the Display mode is ON. April 2010 1 ITE/EC5103PA

The following table describes the DDRAM address and the character position. EXPT6_DD(LCD) Line 1 Position 1 Line 2 Position 14 Line- Position DDRAM Address Line- Position DDRAM Address 1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 1-11 1-12 1-13 1-14 1-15 1-16 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 2-1 2-1 2-3 2-4 2-5 2-6 2-7 2-8 2-9 2-10 2-11 2-12 2-13 2-14 2-15 2-16 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 2. Cursor Display and Blinking Cursor display and blinking of the character at the cursor position are controlled using the Display ON/OFF instruction. The cursor position is at the character corresponding to the address counter value. 3. Reset and Initialise When Power-ON the LCD, the internal reset circuit will initialize the LCD for a duration of 10ms. Upon completion of self-initialisation, the LCD can be configured using the following initialisation sequences: a. Set Function (D/L = 1, N = 1, F = 0) - (Write Instruction) Sets 8-bit interface size, 2-line display size and 5 x 10 pixel character font b. Set Cursor/Display control (D = 1, C = 1, B = 1) - (Write Instruction) Sets the display, the cursor and character blinking ON c. Set Entry Mode (I/D = 1, SH = 0) - (Write Instruction) Sets address counter auto-increment and sets display shift OFF d. Clear Display - (Write Instruction) The program for the LCD initialization is provided. 4. Display Character The following sequences explain the methods for character to be displayed onto the LCD screen: a. Set the DDRAM address (Position for display ) - (Write Instruction) Specifics the location of the display by setting the address counter b. Write the character to the DDRAM (Write Data) April 2010 2 ITE/EC5103PA

Procedures: 1. Connect the LCD circuit to the PC. 2. Activate the Microsoft Visual Studio program and create a New Project. Choose the Windows Forms Application templates with Visual C# Language. 3. Create the project as LCDBasic, and type the C# program in Program 1. 4. Create a window form as shown in Figure 2. The Test Button is to display test character on the LCD upon click. The Send Button is to display message on the LCD upon click. Figure 2 5. Create a display string function to display a message on the LCD. Hints: Create a function call displaystr() as follow: public static void displaystr() byte[] temp = new byte[33]; for (int i = 0; i < LCDString.??????; i++) temp[i] = (byte)lcdstring[i]; displaychar(temp[i], (byte)i); // Students are required to understand array concept 6. Modify the program to output the following messages on the LCD module in sequence with 1 sec delay in between: WELCOME TO ITE ELECTRONICS * ENGINEERING * Name: XYZ Name: ABC Figure 3 7. Demonstrate the program when working. Staff s signature/date: April 2010 3 ITE/EC5103PA

Program 1 using System; using System... System.Runtime.InteropServices; namespace CPA_LCDBasic public partial class Form1 : Form public Form1() InitializeComponent(); private void Form1_Load(object sender, EventArgs e) LCD.initLCD(); private void button2_click(object sender, EventArgs e) LCD.?????? =????.???? LCD.displayStr(); private void button1_click(object sender, EventArgs e) LCD.displayChar(0x41,??); // Display the Testing Character @ Location 1-2 public class LCD public static string LCDString; public static void writeinstr(byte Instr) PortAccess.Output(0x37A, 0x03); // RSL PortAccess.Output(0x378, Instr); PortAccess.Output(0x37A, 0x02); // EH System.Threading.Thread.Sleep(1); PortAccess.Output(0x37A, 0x03); // EL public static void writedata(byte Data) PortAccess.Output(0x37A, 0x01); // RSH PortAccess.Output(0x378, Data); PortAccess.Output(0x37A, 0x00); // EH System.Threading.Thread.Sleep(1); PortAccess.Output(0x37A, 0x03); // EL public static void initlcd() writeinstr(0x??); // Set LCD Function Set (D/L = 1, N = 1, F = 1) writeinstr(0x??); // Display ON/OFF CTRL (D = 1, C = 1, B = 1) writeinstr(0x??); // Set Entry Mode (I/D = 1, S = 0) writeinstr(0x??); // Clear Display public static void displaychar(byte LCDData, byte loc) byte temp; temp =(byte) (0x80 loc); writeinstr(temp); writedata(lcddata); public class PortAccess. April 2010 4 ITE/EC5103PA

Questions: Refer to Appendix 1 & 2 on LCD datasheet and instruction set, complete the following questions: 1. (i) LCD Module Part Number (ii) Number of character (iii) Character font (v) (vi) Viewing angle Dot Size (vii) LCD Type (TN/STN/DSTN/TFT) (viii) Supply Voltage for logic (Under normal) (max) (min) 2 Write down the instruction type and the data code for the respective LCD function. Function Set DDRAM address in address counter to 4A Set interface data length to 8 bit, using 2 display lines and set the font type to 5X10 dots Set all Display, Blinking and Cursor to ON mode Assign cursor moving direction to move to the right and disable the shift of entire display Write 20H to DDRAM set DDRAM to 00H from AC Instruction Set DDRAM Address Instruction Code (Hex) CA 3F April 2010 5 ITE/EC5103PA

3 State the pin assignment of the LCD module. Pin No. Symbol Function 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 April 2010 6 ITE/EC5103PA

Appendix 1: LCD(16x2) module Datasheet April 2010 7 ITE/EC5103PA

Appendix 2: LCD Instruction Set April 2010 8 ITE/EC5103PA