Вы находитесь на странице: 1из 3

HOME

Z80 LCD PIC 8051 Opera Software Files Bookstore Links About me

LCD Commands
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 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. When my friend Hakan Dereli wanted to learn about LC displays I gave him an LC display and the 4*4 keyboard that I used with my Z80 system.The 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. 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

LED Display Panel


LED Display Panel Companies. The Source for Quality Suppliers.
Made-in-China.com/

Microcontroller - info
Infineon product news. Register now to receive the latest updates!
www.infineon-designl

LED Writing Board - India


Attractive Menu Boards for Hotels, Bars, Mobile Shops, Lowest Price
ulivesystems.com/call

Visual Basic
Code and Debug Your Apps On The Fly In The Cloud. Download the Trial
windowsazure.com

LCDs, Character, Graphic www.us-electronics.com


Liquid Character Displays,inverters High quality, lowest prices on line

Oscilloscope Calibrators www.e.FlukeCal.com/Oscilloscope


Download Your Free Oscilloscope Calibration Guide From Fluke Now!

Digital Signage Products www.aptmicro.net


Attract your customers LCD/LED Display Systems

Lattice MachXO2 PLD www.Latticesemi.com/MachXO2


Low Cost, Low Power, & High System Integration in a Single Device

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

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 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:

Follow these links to navigate through my LCD related pages:


C haracte r Type LC D: Introduction C om m ands Initialization De fining custom characte rs C re ating anim ations Z80 Ex am ple s C ustom -C haracte r C alculator LC D sim ulator Final words Graphics LC D: (Base d on: KS0108, HD61202 and sim ilars...) Introduction Powe rtip PG12864D Graphics How To Z80 Ex am ple s C ustom -C haracte r C alculator for KS0108 and com patible s(5*7 Font) C ustom -C haracte r C alculator for KS0108 and com patible s(8*8 Font) Graphic LC D sim ulator Final words

Develop Embedded Displays Model-driven development - display Download Demonstration www.esterel-technologies.com PLC Training In Hyd.100% Placement Assurance Hyderabad 04040194141,09951233399 www.sosindia.in/SCADATrainingCourse 100% Free DataSheet (PDF) Over 20000000 DataSheet. It's Free. Multi Fast Search System. www.AllDataSheet.com

Вам также может понравиться