Most alphanumeric LCD displays have HD44780 compatible driver chipsets that follow the original Hitachi commands to control the LCD.



Similar documents
ELEC 204 Digital System Design LABORATORY MANUAL

Basic Guide line for The Sportident system

DFRobot Romeo All-in-one Microcontroller (ATMega 328) Product code : RB-Dfr-36. Manual. o o. o o o. o 6.2 Example use of Button 1-5. o o o o.

990 e-postcard FAQ. Is there a charge to file form 990-N (e-postcard)? No, the e-postcard system is completely free.

Otomasyon, Danışmanlık Ltd. Şti. INDILOAD DATACARD M AN UAL. Antetli03.doc / Page 9 of 1. Kibele Hedef mükemmele ulasmaksa.

GDM1602A SPECIFICATIONS OF LCD MODULE. Features. Outline dimension

Burner Troubleshooting Guide

AT&T U-verse App ios FAQs

Account Switch Kit. Locations. HACKLEBURG PO DRAWER A US HWY 43 HACKLEBURG, AL Phone: (205) Fax: (205)

Connecting to

User s Guide. Moduc Elements MagiCAD plugin

FOCUS Service Management Software Version 8.5 for Passport Business Solutions Installation Instructions

Getting Your Fingers In On the Action

Using PayPal Website Payments Pro UK with ProductCart

LISTSERV ADMINISTRATION Department of Client Services Information Technology Systems Division

How To Install Fcus Service Management Software On A Pc Or Macbook

AT&T U-verse App for Android FAQs

Merchant Management System. New User Guide CARDSAVE

Exchanging Files Securely with Gerstco Using gpg4win Public Key Encryption

David Drivers Revit One-sheets: Linked Project Positioning and shared coordinates

Agency Fund (Non-Student Org X-Fund) Guidelines Last Revision: 12/7/2009

Helpdesk Support Tickets & Knowledgebase

The ad hoc reporting feature provides a user the ability to generate reports on many of the data items contained in the categories.

Times Table Activities: Multiplication

edoc Lite Recruitment Guidelines

PENNSYLVANIA SURPLUS LINES ASSOCIATION Electronic Filing System (EFS) Frequently Asked Questions and Answers

Mobile & Point of Sale QUICK START GUIDE

Software Distribution

CSAT Account Management

BASIC TECHNICAL FEATURE DESCRIPTION

Durango Merchant Services QuickBooks SyncPay

Using PayPal Website Payments Pro with ProductCart

This page provides help in using WIT.com to carry out the responsibilities listed in the Desk Aid Titled Staffing Specialists

1 ps/2 style keyboard (a computer keyboard with the small round connector that plugs into the computer)

How To Configure A GSM Modem Using HyperTerminal

Manual. Adapter OBD v2. Software version: NEVO DiegoG Full compatibility with OBD Adapter v2 2.0B

FINRA Regulation Filing Application Batch Submissions

SIMULATIONS USING PSPICE & OSCILLOSCOPE TRAINING DRILL

Remote Desktop Tutorial. By: Virginia Ginny Morris

Client Application Installation Guide

Welcome to Remote Access Services (RAS)

Hardware components. Typical connections and data flow. Student 3 page 1: Low Merit

Wireless Light-Level Monitoring

Welcome to CNIPS Training: CACFP Claim Entry

Budget Planning. Accessing Budget Planning Section. Select Click Here for Budget Planning button located close to the bottom of Program Review screen.

Microsoft has released Windows 8.1, a free upgrade to Windows 8. Follow the steps below to upgrade to Windows 8.1.

CU Payroll Data Entry

FOCUS Service Management Software Version 8.5 for CounterPoint Installation Instructions

Getting started with Android

Setting up your New Staff Voic . EVA: Exchange Voic Access. IT Services

Introduction to Fractions and Mixed Numbers

Frequently Asked Questions November 19, Which browsers are compatible with the Global Patent Search Network (GPSN)?

Dreamweaver MX Templates

Tips for Using PCB Artist Getting Started

Instructions for Certify

Serial ATA Staggered Spin-Up

InfiniTV 4 Installation Instructions

How to put together a Workforce Development Fund (WDF) claim 2015/16

Avaya 1608 IP Telephone End User Guide

manual Page 1 / 5 effects in an easy good LED strips can be Selection guide applications. 1) Selection (indoors, outdoors) desired number of LEDs

Outlook Plug-In. Send Conference Invites from Outlook. Downloading Outlook Plug-In CONFERENCING & COLLABORATION RESERVATIONLESS-PLUS

Chalkable Classroom For Students

Topic: Import MS Excel data into MS Project Tips & Troubleshooting

HD44780U (LCD-II) (Dot Matrix Liquid Crystal Display Controller/Driver)

Terms and Conditions of Use of Bewley s Hotel Dublin Airport Car Park

ASUS PC Diagnostics Guide

WFR Point of Sale System Training Outline

AppStore: Search for Mitel MC in the Apple AppStore and install it. The Mitel MC software is free of charge.

Implementation of Doppler Radar

AUTOMATED DEPOSIT CARD: TRAINING & SUPPORT

SBClient and Microsoft Windows Terminal Server (Including Citrix Server)

3/2 MBA Application Instructions

Watson Communications 489 Shoemaker Road Suite 111 King of Prussia Pa for service

Flexible PCB Antenna with Cable Integration Application Note

Perl for OpenVMS Alpha

What is Freegal? How much music is on Freegal Music s website?

About Your Telephone... 3 Conventions... 7 Feature Finder... 8 Answer a Call Make a Call Redial Hold Mute...

iphone Mobile Application Guide Version 2.2.2

Exercise 5 Server Configuration, Web and FTP Instructions and preparatory questions Administration of Computer Systems, Fall 2008

efusion Table of Contents

Derivative Markets and Instruments

Retirement Planning Options Annuities

Counselor in Training Program

Aras Innovator Internet Explorer Client Configuration

DIRECT DATA EXPORT (DDE) USER GUIDE

Service Desk Self Service Overview

Transcription:

LCD Interfacing using HD44780 Hitachi chipset cmpatible LCD s Mst alphanumeric LCD displays have HD44780 cmpatible driver chipsets that fllw the riginal Hitachi cmmands t cntrl the LCD. The mst cmmn cnnectrs fr alphanumeric LCD s are either 14-pin single rw r 2X7 pins dual rw cnnectrs. Pin Descriptin 1 GND (Grund) 2 Vcc (Supply Vltage) 3 Vee (Cntrast Vltage) 4 R/S (Instructin/Register Select) 5 R/W (Read/Write) 6 E (Clck) 7 D0 (Data0) 8 D1 (Data1) 9 D2 (Data2) 10 D3 (Data3) 11 D4 (Data4) 12 D5 (Data5) 13 D6 (Data6) 14 D7 (Data7) A typical LCD write peratin takes place as shwn in the fllwing timing wavefrm: Page 1

The interface is either a 4-bit r 8-bit parallel bus that allws fast reading/writing f data t and frm the LCD. This wavefrm will write an ASCII Byte ut t the LCD's screen. The ASCII cde t be displayed is eight bits lng and is sent t the LCD either fur r eight bits at a time. If 4-bit mde is used, tw nibbles f data (First high fur bits and then lw fur bits with an E Clck pulse with each nibble) are sent t cmplete a full eight-bit transfer. The E Clck is used t initiate the data transfer within the LCD. 8-bit mde is best used when speed is required in an applicatin and at least ten I/O pins are available. 4-bit mde requires a minimum f six bits. In 4-bit mde, nly the tp 4 data bits (DB4-7) are used. The R/S pin is used t select whether data r an instructin is being transferred between the micrcntrller and the LCD. If the pin is high, then the byte at the current LCD Cursr Psitin can be read r written. If the pin is lw, either an instructin is being sent t the LCD r the executin status f the last instructin is read back (whether r nt it has cmpleted). The HD44780 instructin set is shwn belw: R/S R/W D7 D6 D5 D4 D3 D2 D1 D0 Instructin/Descriptin 4 5 14 13 12 11 10 9 8 7 Pins 0 0 0 0 0 0 0 0 0 1 Clear Display 0 0 0 0 0 0 0 0 1 * Return Cursr and LCD t Hme Psitin 0 0 0 0 0 0 0 1 ID S Set Cursr Mve Directin 0 0 0 0 0 0 1 D C B Enable Display/Cursr 0 0 0 0 0 1 SC RL * * Mve Cursr/Shift Display 0 0 0 0 1 DL N F * * Set Interface Length 0 0 0 1 A A A A A A Mve Cursr int CGRAM 0 0 1 A A A A A A A Mve Cursr t Display 0 1 BF * * * * * * * Pll the "Busy Flag" 1 0 D D D D D D D D 1 1 D D D D D D D D The bit descriptins fr the different cmmands are: "*" - Nt Used/Ignred. This bit can be either "1" r "0" Set Cursr Mve Directin: ID - Increment the Cursr after Each Byte Written t Display if Set S - Shift Display when Byte Written t Display Enable Display/Cursr D - Turn Display On(1)/Off(0) C - Turn Cursr On(1)/Off(0) B - Cursr Blink On(1)/Off(0) Write a Character t the Display at the Current Cursr Psitin Read the Character n the Display at the Current Cursr Psitin Page 2

Mve Cursr/Shift Display SC - Display Shift On(1)/Off(0) RL - Directin f Shift Right(1)/Left(0) Set Interface Length DL - Set Data Interface Length 8(1)/4(0) N - Number f Display Lines 1(0)/2(1) F - Character Fnt 5x10(1)/5x7(0) Pll the "Busy Flag" BF - This bit is set while the LCD is prcessing Mve Cursr t CGRAM/Display A - Address Read/Write ASCII t the Display D - Data Reading Data back is best used in applicatins which required data t be mved back and frth n the LCD (such as in applicatins which scrll data between lines). The "Busy Flag" can be plled t determine when the last instructin that has been sent has cmpleted prcessing. Fr mst applicatins, there really is n reasn t read frm the LCD. The applicatin can write t the LCD and wait the maximum amunt f time fr each instructin (4.1 millisecnds fr clearing the display r mving the cursr/display t the "hme psitin", 160 micrsecnds fr all ther cmmands). Different LCD s execute instructins at different rates and t avid prblems later n (such as if the LCD is changed t a slwer unit), the recmmended maximum delays can be used. Page 3

Befre yu can send cmmands r data t the LCD, the LCD must be initialized. Fr 8-bit mde, this is dne as fllws: 1. Wait mre than 15 msecs after pwer is applied. 2. Write 0x030 t LCD and wait 5 msecs fr the instructin t cmplete 3. Write 0x030 t LCD and wait 160 usecs fr instructin t cmplete 4. Write 0x030 AGAIN t LCD and wait 160 usecs r Pll the Busy Flag 5. Set the Operating Characteristics f the LCD Write "Set Interface Length" Write 0x010 t turn ff the Display Write 0x001 t Clear the Display Write "Set Cursr Mve Directin" Setting Cursr Behavir Bits Write "Enable Display/Cursr" & enable Display and Optinal Cursr In 4-bit mde, the high nibble is sent befre the lw nibble and the E pin is tggled each time fur bits is sent t the LCD. T initialize in 4-bit mde: 1. Wait mre than 15 msecs after pwer is applied. 2. Write 0x03 t LCD and wait 5 msecs fr the instructin t cmplete 3. Write 0x03 t LCD and wait 160 usecs fr instructin t cmplete 4. Write 0x03 AGAIN t LCD and wait 160 usecs (r pll the Busy Flag) 5. Set the Operating Characteristics f the LCD Write 0x02 t the LCD t Enable 4-Bit Mde All fllwing Instructin/Data Writes require tw nibble writes. Write "Set Interface Length" Write 0x01/0x00 t turn ff the Display Write 0x00/0x01 t Clear the Display Write "Set Cursr Mve Directin" Setting Cursr Behavir Bits Write "Enable Display/Cursr" & enable Display and Optinal Cursr Page 4

Cde Example fr 4-bit mde LCD initializatin and displaying a message: main() unsigned char i; /* Initialize the LCD as the very first thing */ InitLCD(); /* Write a simple message t the LCD */ WriteLCD( "Hell" ); vid InitLCD() /* Wait a bit after pwer-up */ delay(200); /* Initialize the LCD t 4-bit mde */ WriteCtrl(3); delay(50); WriteCtrl(3); WriteCtrl(3); WriteCtrl(2); /* Functin Set */ WriteCtrl(2); WriteCtrl(8); /* Display OFF */ WriteCtrl(8); /* Display ON */ WriteCtrl(0x0F); /* Entry mde */ WriteCtrl(6); /* Clear Screen */ Page 5

WriteCtrl(1); delay(100); /* Cursr hme */ WriteCtrl(2); delay(100); vid WriteLCD( unsigned char* message ) unsigned char i; fr( i=0; i<20; i++ ) if(!message[i] ) break; WriteData(message[i]); vid WriteCtrl( unsigned char value ) clrbit(ctrl); WriteCmmn( value ); vid WriteData( unsigned char value ) setbit(ctrl); WriteCmmn( value >> 4 ); WriteCmmn( value ); vid WriteCmmn( unsigned char value ) clrbit(read); value = value & 0x0F; value = value << 4; P0 = P0 & 0x0F; P0 = P0 value; setbit(strobe); delay(1); clrbit(strobe); setbit(read); delay(1); Page 6