Sunteți pe pagina 1din 6

HD44780 Commands

http://www.geocities.com/dinceraydin/lcd/commands.htm

Z80 LCD PIC 8051 Opera Software Files Bookstore Links About me

The commands for HD44780 chip are shown in the table below. Scroll down to see the commands in binary, and more info on the entry mode set command. INSTRUCTION Function set (8-bit interface, 2 lines, 5*7 Pixels) Function set (8-bit interface, 1 line, 5*7 Pixels) Function set (4-bit interface, 2 lines, 5*7 Pixels) Function set (4-bit interface, 1 line, 5*7 Pixels) Entry mode set Scroll display one character right (all lines) Scroll display one character left (all lines) Home (move cursor to top/left character position) Move cursor one character left Move cursor one character right Turn on visible underline cursor Turn on visible blinking-block cursor Make cursor invisible Blank the display (without clearing) Restore the display (with cursor hidden) Clear Screen Set cursor position (DDRAM address) Set pointer in character-generator RAM (CG RAM address) Read DDRAM/CGRAM & Check Busy Flag Decimal 56 48 40 32 See Below 28 24 2 16 20 14 15 12 8 12 1 128 + addr 64 + addr See Below Hexadecimal 38 30 28 20 See Below 1E 18 2 10 14 0E 0F 0C 08 0C 01 80+ addr 40+ addr See Below

1 of 6

3/1/2012 11:11 PM

HD44780 Commands

http://www.geocities.com/dinceraydin/lcd/commands.htm

Entry mode set command This command sets cursor move direction and display shift ON/OFF. There are 4 possible function set commands;04, 05, 06, and 07. This command changes the direction the cursor moves by setting the address counter to increment or decrement. This command is very important. If you do not understand it you may not see anything or what you actually wanted to see on LCD screen. I have created 4 animated gifs to demonstrate what the function set command is all about.
Data Acquisition System www.daqsystem.com Analog Digital I/O & Frame Grabber Motion Control & Machine vision Free Programming Courses code.he.net Get started in minutes! Become a Software Engineer Microcontroller Dev Kits www.embeddeddeveloper.com Broad Range of Tools and Software Parametric Database, Ordering Info

Signax Led Display

Manufacturing Led Display China Expert Commercial Led Displays


www.signax.com.hk

Download Google Chrome


Searching is fast and easy with Google's web browser.

www.google.com/ch

Affiliate Make Money

Steps To Start Your Online Business Cash Flow Business Online Join Now!
www.HYaffiliates.com

When my friend Hakan Dereli wanted to learn about Compare Visio & SmartDraw www.SmartDraw.com LC displays I gave him an LC display and the 4*4 5 Reasons to Choose SmartDraw Instead of keyboard that I used with my Z80 system.The Visio. Try it Today! keyboard is based on a 74C922 chip and my circuit to convert the 4 bit data output of the 74C922 to 8 bit data.It also has 3 other buttons on it.This makes it great to experiment with LCDs by entering commands/data manually. Hakan tested all possible commands by sending all the numbers between 00h and FFh to the LCD to see if there is an undocumented feature and see how all commands work. He did not find anything undocumented, but he noted how LCD behaves after each function set command. Below are the gifs to demonstrate those commands. To demonstrate the effect of each function set command it is assumed that the LCDs below are 2*16 LC Displays with DD RAM address set to 8 and underline cursor ON. Note that when the address counter is set to DECREMENT, strings sent to the LCD will be printed in reverse order. The same thing applies to the CG RAM, as well. Entry mode set command 04h

Get Data & Recover Files

Recover Your Files With Get Data Easy Recovery, Download Now
www.getdata.com

2 of 6

3/1/2012 11:11 PM

HD44780 Commands

http://www.geocities.com/dinceraydin/lcd/commands.htm

Decrement Address Counter Display Shift :OFF String:Dereli

Entry mode set command 05h Display Shift :ON Decrement Address Counter String :Hakan

Entry mode set command 06h Display Shift :OFF Increment Address Counter String:Dereli

Entry mode set command 07h

3 of 6

3/1/2012 11:11 PM

HD44780 Commands

http://www.geocities.com/dinceraydin/lcd/commands.htm

Display Shift :ON Increment Address Counter String:Hakan

Checking the Busy Flag To check the state of the busy flag and read the address counter 1. 2. 3. 4. Set R/W Pin of the LCD HIGH(read from the LCD) Select the instruction register by setting RS pin LOW Enable the LCD by Setting the enable pin HIGH The most significant bit of the LCD data bus is the state of the busy flag(1=Busy,0=ready to accept instructions/data).The other bits hold the current value of the address counter. *This is a 1-micro-second instruction. Complete command reference:

4 of 6

3/1/2012 11:11 PM

HD44780 Commands

http://www.geocities.com/dinceraydin/lcd/commands.htm

5 of 6

3/1/2012 11:11 PM

HD44780 Commands

http://www.geocities.com/dinceraydin/lcd/commands.htm

Character Type LCD: Introduction Commands Initialization Defining custom characters Creating animations Z80 Examples Custom-Character Calculator LCD simulator Final words

Graphics LCD: (Based on: KS0108, HD61202 and similars...) Introduction Powertip PG12864D Graphics How To Z80 Examples Custom-Character Calculator for KS0108 and compatibles(5*7 Font) Custom-Character Calculator for KS0108 and compatibles(8*8 Font) Graphic LCD simulator Final words

Teach Project Management Project management training material to teach Project Mgmt. CorporateTrainingMaterials.com ARM Programmer's Guide Intro to the ARM architecture used in Cortex A-Series processors eetimes.com/design/ Remote Connectivity Integrate remote data, auditing & iSeries apps using ProData tools. www.dodbu.com Nebosh,Iosh,Osha,Oil&Gas Nebosh IGC,Oil & Gas in Chennai, Mumbai,Bangalore & Cochin-All India www.nistinstitute.com/18001

6 of 6

3/1/2012 11:11 PM

S-ar putea să vă placă și