Showing posts with label DDRAM or CGRAM. Show all posts
Showing posts with label DDRAM or CGRAM. Show all posts

Friday, May 25, 2012

Schematic Liquid Crystal Display LCD

The HD44780 dot-matrix liquid crystal display controller and driver LSI displays alphanumeric characters and symbols. It can be configured to drive a dot-matrix liquid crystal display when interfaced with a processor. A single HD44780 can display up to one 8-character line or two 8-character lines. The HD44780 supports 8 dot character fonts and 32 5 ´ 10 dot character fonts for a total of 240 different character fonts.

2.1 Function Description of LCD
The following section will introduce the user with some of the important features of the liquid crystal display, that are important for interfacing with the liquid crystal display through software.

2.1.1 Registers of LCD

The HD44780 has two 8-bit registers, an instruction register (IR) and a data register (DR). The IR stores instruction information, such as display clear and cursor shift, and address information for display data RAM (DDRAM) and character generator RAM (CGRAM). The DR temporarily stores data to be written into DDRAM or CGRAM and temporarily stores data to be read from DDRAM or CGRAM. Data written into the DR is automatically written into DDRAM or CGRAM by an internal operation. The DR is also used for data storage when reading data from DDRAM or CGRAM. When address information is written into the IR, data is read and then stored into the DR from DDRAM or CGRAM by an internal operation.

2.1.2 Busy Flag of LCD

When the busy flag is 1, the HD44780U is in the internal operation mode, and the next instruction will not be accepted. When RS = 0 and R/W = 1 (Table 1), the busy flag is output to DB7. The next instruction must be written after ensuring that the busy flag is 0. The following diagram can visualize the timing diagram for the busy flag check for the LCD.
instruction write busy flag check LCD how to check busy flag of LCD  DDRAM or CGRAM, Character Generator RAM
Checking the Busy Flag (BF) of LCD

2.1.3 Address Counter of LCD

The address counter (AC) assigns addresses to both DDRAM and CGRAM. When an address of an instruction is written into the IR, the address information is sent from the IR to the AC. Selection of either DDRAM or CGRAM is also determined concurrently by the instruction. After writing into (reading from) DDRAM or CGRAM, the AC is automatically incremented by 1 (decremented by 1). The AC contents are then output to DB0 to DB6 when RS = 0 and R/W = 1.

2.2 Initializing by Internal Reset Circuit of LCD

An internal reset circuit automatically initializes the HD44780 when the power is turned on. The following instructions are executed during the initialization. The busy flag (BF) is kept in the busy state until the initialization ends (BF = 1). The busy state lasts for 10 ms after VCC rises to 4.5 V.
1. Display clear
2. Function set:
DL = 1; 8-bit interface data
N = 0; 1-line display
F = 0; 5 ´ 8 dot character font
3. Display on/off control:
D = 0; Display off
C = 0; Cursor off
B = 0; Blinking off
4. Entry mode set:
I/D = 1; Increment by 1
S = 0; No shift

2.3 Pin Configuration

The pin configuration of LCD along with their functionality is shown below
Table 1: Pin Assignments of HD44780
Display on/off control Pin Configuration PIN number SYMBOL LEVEL Function of LCD

2.4 Instruction Set of LCD
Here is the instruction set summary of HD44780 LCD, also some explanation is provided in the following table.
Table 2: Instruction Set Summary of HD44780
Instruction Set Summary of HD44780


read more "Schematic Liquid Crystal Display LCD"

Friday, December 2, 2011

Schematic LCD interfacing with Microcontroller 8051

LCD interfacing with Microcontroller 8051

LCD overview :-

We probably use items containing an LCD (liquid crystal display) every day. They are all around us -- in laptop computers, digital clocks and watches, microwave ovens, CD players and many other electronic devices. LCDs are common because they offer some real advantages over other display technologies. They are thinner and lighter and draw much less power than cathode ray tubes (CRTs),
Common-plane-based LCDs are good for simple displays that need to show the same information over and over again. Watches and microwave timers fall into this category. Although the hexagonal bar shape illustrated previously is the most common form of electrode arrangement in such devices, almost any shape is possible. Just take a look at some inexpensive handheld games: Playing cards, aliens, fish and slot machines are just some of the electrode shapes you'll see.
The HD44780 dot-matrix liquid crystal display controller and driver LSI displays alphanumeric characters and symbols. It can be configured to drive a dot-matrix liquid crystal display when interfaced with a processor. A single HD44780 can display up to one 8-character line or two 8-character lines.HD44780 supports 8 dot character fonts and 32 5 ´ 10 dot character fonts for a total of 240 different character fonts.
3.1 Function Description

The following section will introduce the user with some of the important features of the liquid crystal display, that are important for interfacing with the liquid crystal display through software.

3.1.1 Registers

The HD44780 has two 8-bit registers, an instruction register (IR) and a data register (DR).The IR stores instruction information, such as display clear and cursor shift, and address information for display data RAM (DDRAM) and character generator RAM (CGRAM). The DR temporarily stores data to be write into DDRAM or CGRAM and temporarily stores data to be read from DDRAM or CGRAM. Data written into the DR is automatically written into DDRAM or CGRAM by an internal operation. The DR is also used for data storage when reading data from DDRAM or CGRAM. When address information is written into the IR, data is read and then stored into the DR from DDRAM or CGRAM by an internal operation.




3.1.2 Busy Flag (BF)

The Lcd controller chip needs some time to execute the instruction or data write, and whenever it receives something it starts this internal operation routine that takes time, during this time the controller will be busy and will not understand anything else that you send. So, it will be necessary to wait a little bit after you send something to the LCD. How long is it? Nobody knows, it depends on the controller type and operation, and it can varies. You can build a "wasting time" routine to wait for some time after each write to the LCD, but it will be or too short, or too long because you would never know how long will be enough. For example, the Clear command takes the longest time, a simple data write not too long.
To avoid guessing and testing, just use a simple way to check if the LCD controller is busy or not, there is the busy bit.
After writing to the LCD, send a "read instruction" and check bit 7, this is the busy bit, a high level means the controller still busy, a low level means the controller finished the previous operation and is available to receive more bytes.


 BACK to Content Page

 . Next Page

.   Previous Page
read more "Schematic LCD interfacing with Microcontroller 8051"