Vous êtes sur la page 1sur 28

2/28/2011 User Manual - Crystalonics Displays (P) …

User Manual

CDM - USER’S MANUAL CONTENTS I


FEATURES OF CRYSTALONICS DISPLAY MODULES II GENERAL VIEW OF AN LCD (A)
INTRODUCTION (B) ELECTRO OPTICAL CHARACTERISTICS OF THE LCD’S (C)
BACKLIGHTING (D) PIN DETAILS (E) ORDERING INFORMATION III HARDWARE
DESCRIPTION (A) POWER SUPPLY REQUIREMENTS (B) INTERFACING (C) TIMING
ASPECTS OF LCD’S IV SOFTWARE DESCRIPTION (A) INTRODUCTION (B) INSTRUCTION
CODES (C) INITIALIZATION FLOW FOR 8 BIT AND 4 BIT LCD MODULES (D) FUNCTIONAL
DESCRIPTION OF THE CONTROLLER IC (E) DDRAM LOCATIONS (F) CGRAM
PROGRAMMING (G) CHARACTER FONT TABLE V PRECAUTIONS (A) POWER SUPPLY
PRECAUTIONS (B) MECHANICAL PRECAUTIONS (C) ENVIRONMENTAL PRECAUTIONS
(D) OPERATING PRECAUTIONS VI TROUBLESHOOTING

I FEATURES OF CRYSTALONICS DISPLAY MODULES q Displays Alphanumeric


Characters, Special symbols & characters q Easy interface with a 4-bit or 8-bit MCU q Built-in
Dot Matrix LCD Controller with font 5x8 or 5x10 Dots q Built in Display Data RAM (DD RAM),
Character Generator RAM (CG RAM) and Character Generator ROM (CG ROM) q Automatic
power on Reset q Low power consumption q Various instruction functions q High contrast ratio q
Wide viewing angle q Rapid response time q With & without Backlight q High quality standards q
Long life q Custom made LCD’s q Wide temperature range * q C-Dot Approved * * Applies for
selected Modules only. II GENERAL VIEW OF AN LCD (A) INTRODUCTION The Liquid
Crystal Display (LCD) is a thin layer of ”Liquid Crystal Material” deposited between two
plates of glass. LCD’s have materials, which combine the properties of both Liquids and
Crystals. Rather than having a melting point, they have a temperature range with in which the
molecules are almost as mobile as they would be in a Liquid, but are grouped together in an
ordered form similar to a Crystal. An LCD consists of two glass panels, with the liquid crystal
material sandwiched in between them. The inner surfaces of the glass plates are coated with
transparent electrodes, which define the character, symbols or patterns to be displayed.
Polymeric layers are present in between the electrodes and the liquid crystal, which makes
the liquid crystal molecules to maintain a defined orientation angle. There are polarizers on the
glass panels. These polarizers rotate the light rays passing through them to a definite angle in a
particular direction. When LCD is in the off state light rays are rotated by the two polarizers and
the liquid crystal, such that the light rays come out of the LCD without any orientation, and the
LCD appears transparent. When sufficient voltage is applied to the electrodes, the liquid crystal
…wetpaint.com/page/User+Manual 1/28
2/28/2011 User Manual - Crystalonics Displays (P) …
molecules would be aligned in a specific direction. The light rays, which are rotated by polarizers
passing through the LCD, would result in highlighting the specific character. Since LCD’s consume
less power they are compatible with low power electronic circuits, and can be powered for long
durations. The LCD’s have a long life and wide operating temperature range between -20°C and
+70°C. The LCD’s are lightweight with only a few millimeters thickness. LCD’s do not generate
light. So light is required to read the display. Hence Displays are readable both day and night by
selecting a backlight option. LCD’s are extensively used in segment displays like Watches,
Calculators, Clock, Camera, Audio Equipments, Home Appliances, Instruments, Telephones,
Automobiles, and Games etc. Recent advances in LCD technologies have resulted in LCD’s being
extensively used in telecommunications and consumer electronics. The LCD’s have even started
replacing Cathode Ray Tubes (CRTs) used for the display of text and graphics, and also in TV
applications. An LCD module is selected depending on § The size and format required in
displaying the desired information. § The optical characteristics that looks best in the module.
Alphanumeric modules display characters, numerals, symbols and some limited graphics. Interface
is achieved via a bi-directional, parallel ASCII data bus. Necessary features such as Character
generation RAM (CG RAM), Display Device RAM (DDRAM) addressing, cursor scrolling,
Blanking, User programmable fonts and Handshake are all included. These modules are the
simplest and most economic means to communicate between any micro system and the outside
world. Alphanumeric modules ranges One, two or four character lines are possible. Most formats
are available in a variety of packages to meet various mounting requirements. Selecting the exact
version of an LCD once the format is decided is largely a subjective judgment. Color, fluid type
and backlighting determine the overall look of the display and often the appearance of the final
product. Operating condition such as temperature, lighting condition and available power are also
factors in determining the type of display to be used. (B) ELECTRO OPTICAL
CHARACTERISTICS OF THE LCD’S The Electro-Optical characteristics of the LCD’s depend
on the type of fluid used. The fluid type determines the contrast ratio, viewing angle and
temperature range of an LCD. The widely used types are Twisted Nematic (TN Standard type) and
Super Twisted Nematic (STN premium high contrast type). TN Fluid TN fluid is the least
expensive type. The viewing angle is about 40-45°,and must be designated “top”’ or “bottom” view
preference. Bottom view is used when the user will be below the plane perpendicular to the display,
such as on a desk calculator. Top view is used when the display is mounted on a vertical surface
below eye level. STN Fluid STN is a high contrast and wide viewing angle fluid. The viewing angle
is about 75° and it can be viewed above and below the plane perpendicular to the display.

Viewing Angle and Direction

The viewing angle can be defined as the cone subtended by the viewers eye, when the Display is
viewed at the two extreme angles while having a readable contrast level. The viewing direction can
be defined as the viewers eye direction with respect to the normal drawn perpendicular to the
display’s surface. When the display is viewed from above the normal, it is termed as top view (12
O’ Clock). When viewed from below the normal, it is termed as bottom view (6 O’ clock).
Generally, the Displays used are of the bottom view type. A1 – Approximate Nominal viewing cone
(Top & Bottom view) for TN type. B1 – Approximate Adjustable viewing cone (Top & Bottom
view) for TN type. A2 – Approximate Nominal viewing cone for STN type. B2 - Approximate
Adjustable viewing cone for STN type.Brightness Brightness of LCD is a ratio of the luminance

…wetpaint.com/page/User+Manual 2/28
2/28/2011 User Manual - Crystalonics Displays (P) …
of the reflected or transmitted light to the luminance of the incident light. Reflective display will
therefore tend to appear rather gray/dark. Brighter display can be obtained by providing
backlighting. Contrast Ratio Contrast Ratio of LCD is a ratio of brightness of the non-activated
pixels to that of the activated pixels. Contrast Ratio = Brightness of Non-activated pixels (B2)
Brightness of activated pixels (B1) B1 B2 SET POINT DRIVING VOLTAGE Brightness &
Contrast, both depend on the polarizers used. Low efficiency polarizers give bright displays
but low contrast. High efficiency polarizers give high contrast and less brightness.
Illumination Modes In normal version LCD’s, ambient light falls on the display and the
reflector present on the backside of the rear glass reflects the light making the characters
readable. In the backlight version of LCD’s, a light source usually LED array behind the
glass panel provides the light for reading the characters. The TN type LCD, which is used
widely in the normal / non-backlight version, comes with grey background color. This type is
not generally preferred for the backlighted version. The STN type LCD, which is rapidly
replacing the older TN type, comes in different types. These are available in grey as well as
green colors. For the backlighted version, these types of LCD’s are preferred. LCD’s
operating in an extended temperature range are also available. Temperature Ranges
Normal Temperature Range Extended Temperature Range
LCD LCD
Operating 0 deg C to +50 deg C -20 deg C to +70 deg C
Temperature
Storage -20 deg C to +70 deg C -30 deg C to +80 deg C
Temperature
(C) BACKLIGHTING Backlighting is used on LCD’s to make them readable in low light
conditions. Generally, there are two methods to backlight character LCD module: (1) Electro
luminescent (EL) and (2) Light Emitting Diode (LED). Selection depends on desired color,
available power and required life. The widely used backlighting is of the LED Array Type. Light
Emitting Diode (LED) LED backlighting offers a significant life advantage over EL lamps, but at
the expense of power and module size. Lamp life is in excess of 50,000 hours, and in most cases, 1
lamp failing does not make the backlight unusable. The absence of any noise/interference, a typical
lifetime of 100,000 hours on an average, the low DC drive voltage of 5V and the various color
options available makes the LED backlighting the widely used one. Standard color is yellow-green,
red, amber and other colors may be special ordered. Since the sensitivity of the eye is maximum at
around 550 nm, the yellow green color backlighting is most widely used. The electro-optical
characteristics of the LED array are given below. There are two types of LED backlights: (1)
Edgelit Style (2) Array Style Edgelit can be used on modules up to 20 characters wide. Beyond 20
characters, the middle of the display begins to dim when compared to the edges. Edgelight type
consumes lesser power compared to array type. Array backlighting produces brighter and more
even light. Power is the main consideration when designing with this type of from 8 to 40
characters per line. module. It is not recommended for battery-powered applications where the
lamp will be on all the time. Variable brightness can be controlled with a digital potentiometer or
pulse-width modulated circuit. (D) PIN DETAILS Pin No. Symbol Description Pin 1 VSS
Ground Terminal, 0V Pin 2 VDD Supply Terminal, +5V Pin 3 VL Liquid Crystal drive voltage Pin
4 RS Register Select: RS = 0 – Instruction Register RS = 1 – Data Register Pin 5 R/W Read /
Write: R/W = 1 – Read R/W = 0 – Write Pin 6 E Enable: Enables Read / Write Pin 7 DB0 Bi-
directional data bus: To to When interface data length is 8 bits, Pin 14 DB7 data transfer is done

…wetpaint.com/page/User+Manual 3/28
2/28/2011 User Manual - Crystalonics Displays (P) …
once through DB0 - DB7. When the interface data length is 4 bits, data transfer is done twice
through DB4 – DB7. Pin 15 BACKLIGHT In case of 15 pin modules, Pin15 is the Pin 16 SUPPLY
supply voltage (+5V) for the LED. In case of 16 pin modules, Pin15 is the Ground (0V) and Pin16
is the Supply Voltage (+5V) for the LED.

(E) ORDERING INFORMATION

CDM 1 2 3 4 5 6 7 8 9 10 11 12 13 1-5 --- Model Number


1&2 --- Number of Characters 3 --- Number of Lines 4&5 --- Duty Factor 6 --- Model
Identification / Character Size Can be Blank. 7&8 --- Type of LCD TN -- Twisted Nematic STN --
Super Twisted Nematic 9&10 --- Background Color GY -- Gray GN -- Green 11&12 ---
Illumination Mode BL -- LED Backlight NL -- Normal 13 --- Temperature Range N -- Normal W -
- Wide NOTE: 1. For some models only 5-digit model number after CDM will reflect on the PCB.
For example CDM 16116. 2. Some Models will have 5-digit + 1 character will reflect on the PCB.
3. The remaining code from 7 to 13 will be on a written sticker. III HARDWARE
DESCRIPTION (A) POWER SUPPLY REQUIREMENTS The supply should be of
+5V at 1 to 10 milliamps. To achieve a better / suitable contrast for the display, the driver voltage
(VL) at Pin3 should be adjusted properly. Extended temperature and some high contrast modules
require –5V,also at low current. Inexpensive IC’s convert +5V to –5V efficiently. If the display has
backlighting, required power must also be budgeted. The power supply does not have to “lock-on”
+5V but it must not “spike” beyond the module’s absolute maximums. A module’s logic circuits
have 3 connections to the power supply: VDD (+5V DC); VSS (Ground); and VL (Contrast or bias
control or viewing angle adjustment voltage). Recommend the end user to use variable resistor as
shown in the circuit for optimum VLCD (VDD-VL) adjustments to obtain best display contrast and
viewing angle. Power Supply for single supply voltage Power Supply for Dual supply voltage
VDD VL VSS
VDD VL VSS

+5VDC +5VDC -5VDC 0VDC 0VDC +5VDC Input LCD Module ±5VDC Input LCD Module

(B) INTERFACING LCD modules can communicate bi-directionally within the master system.
Tie the device into the system data bus & treat it as RAM, I/O, or expanded, parallel I/O. The
module is “selected” by gating a decoded, “module-address” output, with the host processor’s “read
or write” strobe. The resultant signal, applied to the LCD’s “enable” input, clocks in the data. Since
there is no conventional “chip-select” signal, developing a strobe signal for the Enable signal (E)
and applying appropriate signals to the Register Select (RS) and Read / Write (R/W) signals are
important. Interfacing the module involves: (1) Joining the module to the host’s data bus. (2)
Developing a “strobe” signal for the “E” signal. (3) Applying appropriate signals to module’s “RS”
and “R/W”. (4) Applying the proper “viewing angle” voltage to the display’s VL pin. For 4-bit data
interface, the bus lines DB4 to DB7 are used for data transfer, while DB0 to DB3 lines are
disabled. The data transfer is complete when the 4-bit data has been transferred twice. The busy flag
must be checked after the 4-bit data has been transferred twice. For 8-bit data interface, all eight-
…wetpaint.com/page/User+Manual 4/28
2/28/2011 User Manual - Crystalonics Displays (P) …
bus lines (DB0 to DB7) are used. INTERFACING TO MCU 4-BIT DATA INTERFACE
P1.0 P1.1 MCU P1.2 P3.4 P3.5 P3.6 P3.7
E RS R/W LCD MODULE DB4 DB5 DB6 DB7

8 BIT DATA INTERFACE


E RS R/W LCD MODULE DB0 TO DB7
P1.0 MCU P1.1 P1.2 P3.0 TO P3.7

(C) TIMING ASPECTS OF LCD’S LCD modules must be properly interfaced to the host micro
controller. The modules are classified as a “slow” peripheral. Both access and strobe times exceed
those normally encountered. The Enable (E) signal is the key signal line. The E signal must be a
positive going digital strobe, which is active while data and control information are stable and true.
The falling edge of the E signal enables the data/instruction register of the controller. All module
timings are referenced to specific edges of the E signal. The E signal is applied only when a
specific module transaction is desired. The Read and Write strobes of the host, which provides the
E signal, should not be linked to the module’s R/W line. An address bit, which sets up earlier in the
host’s Machine Cycle, can be used as R/W. The problem is encountered when the host processor is
running so fast that the strobes are two narrow to serve as the E pulse. In this case: § Prolong these
pulses by using the host’s ‘Ready’ input. § Prolong the host by adding wait states. § Decrease the
host’s crystal frequency. When these options are not viable it will be necessary to latch both data
and control information and then activate the E signal. The module presents no difficulties while
interfacing slower MCU’s.

The Relationship between the operation and the combination of RS, R/W

RS R/W E OPERATION
0 0 Write instruction
code
0 1 Read busy flag and
Address Counter
1 0 Write data
1 1 Read data
The Interface timing diagrams and the Read / Write timing diagrams are given below IV
SOFTWARE DESCRIPTION (A) INTRODUCTION Software determines what, how, and where
data is displayed on the LCD. The special features of the built in LCD controller IC are: ¨
Character Generator ROM (CG ROM) that provides 208 characters with font 5x8 dots and 32
characters with font 5x10 dots ¨ Character Generator RAM (CG RAM) having a storage function of
8 character patterns, which can freely be changed by users program ¨ Display Data RAM with a
maximum of 80 characters ¨ Bi-directional 8 or 4 bit data bus interface ¨ Automatic reset on
…wetpaint.com/page/User+Manual 5/28
2/28/2011 User Manual - Crystalonics Displays (P) …
power up ¨ Internal oscillator with an external resistor (No external clock required) ¨ Wide range
of instruction functions including: Display clear, Cursor Positioning, Display or Cursor shift on
data entry and Display ON/OFF. Display Data RAM (DD RAM): The character to be displayed is
written into the DD RAM, in the form of 8 bit character codes present in the character font table.
DD RAM can store a maximum of 80 characters. The display data RAM (DD RAM) that is not used
for display can be used as general data RAM. Depending on the 8-bit character code that is written
in to the DD RAM, LCD will select the character pattern either from Character Generator RAM
(CG RAM) or from Character Generator ROM (CG ROM). Character Generator ROM (CG
ROM): The CG ROM generates 5x8 dot or 5x10 dot character patterns from 8 bit character codes
(refer character font table). It can generate 208, 5x8 dot character patterns and 32, 5x10 dot
character patterns. When an 8-bit character code of the CG ROM is written to the DD RAM, the
character pattern of the CG ROM corresponding to the code is displayed on the LCD display
position corresponding to the DD RAM. Character Generator RAM (CG RAM): In the CG
RAM, the user can rewrite character patterns by program. For 5x8 dots, 8 character patterns can be
written and for 5x10 dots, 4 characters patterns can be written. Programming of these character
patterns is explained in CG RAM programming. (B) INSTRUCTION CODES Instruction codes
are the control information sent by the user, through the micro controller, to the IR and DR of the
controller IC, present in the module. Before starting the internal operation, the controller stores
the control information temporarily in these registers. The internal operations are determined by
the signals sent from the MCU, which include RS, R/W, E signal and the Data Bus (DB0-DB7).
NOTE
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
RS R/W X X X X X X X X
DATA For Instruction Register / Data register

R/W -- Read / Write


§ CLEAR DISPLAY
R/W -- 1: Data is read from CG RAM / DD RAM
R/W -- 0: Data is written to CG RAM / DD RAM
RS -- Register Select
RS -- 0: Selects Command Register for Reading / Writing
RS -- 1: Selects Data Register for Reading / writing
Loads character code for blank (20H) into all the DD RAM addresses. The cursor returns to
address 0(Address = “80”) and display, if it has been shifted, returns to the original position. i.e.,
display disappears and the cursor goes to the left edge of the display (to the first line if 2/4 line
display module is used). The Cursor is brought to the first position of first line. Instruction
execution time is 1.52ms.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 0 0 1
DB7 – DB0 -- 01H: Clears the Display and all the DD RAM locations

§ RETURN HOME
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
…wetpaint.com/page/User+Manual 6/28
RS
2/28/2011 R/W DB7 DB6 DB5- Crystalonics
User Manual DB4 Displays
DB3(P) … DB2 DB1 DB0
0 0 0 0 0 0 0 0 1 X
DB7 – DB0 -- 02H , 03H: The cursor goes to the first position of the first line Returns the cursor
to address 0(Address=80) and display, if it has been shifted, to the original position. The DD RAM
contents remain unchanged. Instruction execution time is 1.52ms. § ENTRY MODE SET
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 1 I/D S
I/D = 0: Decrements the address of DD RAM / CG RAM when data is written to or read from DD
RAM / CG RAM. Cursor is shifted left on the display. I/D = 1: Increments the address DD RAM /
CG RAM when data is written to or read from DD RAM / CG RAM. Cursor is shifted right on the
display. S = 0: The Display is not scrolled. S = 1: The display scrolls. Direction of scrolls depends
on the value of I/D. DATA DB7 – DB0 -- 04H: Data written from right to left. Display is not
scrolled. DB7 – DB0 -- 06H: Data written from left to right. Display is not scrolled. DB7 – DB0 -
- 05H: Data written from right to left. Display scrolls. DB7 – DB0 -- 07H: Data written from left
to right. Display scrolls. Instruction execution time is 37µS. § DISPLAY ON / OFF
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 1 D C B
D: The display is ON when D=1, and OFF when D=0. When OFF, the display data remains in the
DD RAM and can be displayed by setting D to 1. C: The cursor is displayed when C=1, and not
displayed when C=0. The cursor is displayed in the 8th line for the character font selection of 5x8
dots. B: The character indicated by the cursor blinks when B=1. The blinking is displayed as
switching between all black dots (dots ON) and displayed character at a speed of 409.6ms intervals
while the controller IC operates at a clock frequency of 250KHZ. DATA DB7 – DB0 -- 08H
Display OFF DB7 – DB0 -- 0CH Display ON and cursor OFF DB7 – DB0 -- 0EH Display ON and
cursor ON not Blinking DB7 – DB0 -- 0FH Display ON and cursor ON Blinking Instruction
execution time is 37µS. § CURSOR / DISPLAY SHIFT This instruction shifts the cursor / display
to the right or left, without writing or reading the display data. This function is used for correction
or search of display.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 1 S/C R/L X X
S/C R/L 0 0 Shifts the cursor position to the left. AC is decremented by one. 0 1 Shifts the cursor
position to the right. AC is incremented by one. 1 0 Shifts the entire Display to the left. Cursor
follows the display shift. 1 1 Shifts the entire Display to the right. Cursor follows the display shift.
When the displayed data is shifted repeatedly, each line moves horizontally. The second line
display does not shift in to the first line position. The Address Counter contents would not change,
if only, the display shift operation is performed. Instruction execution time is 37µS. DATA DB7 –
DB0 -- 10H: Shifts the cursor position to left DB7 – DB0 -- 14H: Shifts the cursor position to
right DB7 – DB0 -- 18H: Shifts the entire display to left Cursor follows the display shift DB7 –
DB0 -- 1CH: Shifts the entire display to right Cursor follows the display shift § FUNCTION SET
This instruction initializes the system, and must be the first instruction to be executed after power
on. Instruction execution time is 37µS.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 1 DL N F X X
DL—Sets the interface data length to 8-bit when DL=1, and 4-bit when DL=0. N – Sets the
Number of Display lines F – Sets the Character fontDATA DB7 – DB0 -- 30H: Sets the display as
One Line, 5 X 8 dots character size and data transfer is 8-Bits DB7 – DB0 -- 34H: Sets the display
…wetpaint.com/page/User+Manual 7/28
2/28/2011 User Manual - Crystalonics Displays (P) …
as One Line, 5 X 10 dots character size and data transfer is 8-Bits DB7 – DB0 -- 38H: Sets the
display as Two Lines, 5 X 8 dots character size and data transfer is 8-Bits DB7 – DB0 -- 20H: Sets
the display as One Line, 5 X 8 dots character size and data transfer is 4-Bits DB7 – DB0 -- 24H:
Sets the display as One Line, 5 X 10 dots character size and data transfer is 4-Bits DB7 – DB0 --
28H: Sets the display as Two Lines, 5 X 8 dots character size and data transfer is 4-Bits Note: This
instruction also sets the display as four lines, 5 X 8 dots character in 4-line display modules. § SET
CG RAM ADDRESS This instruction loads a new 6-bit address into the Address Counter and sets it
to address the CG RAM. Henceforth, the contents of the Address Counter will be automatically
modified after each access of CG RAM, as selected by the ‘Entry Mode set’ instruction. If this
instruction is issued by the system MCU while the display is enabled, and if either the cursor or
blink is on, the display will blink. To avoid this, both the cursor and display blink should be turned
off before loading a new CG RAM address. Instruction execution time is 37µS.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 1 ACG ACG ACG ACG ACG ACG
DB7 – DB0 -- 40H to 7EH § SET DD RAM ADDRESS This instruction loads a new 7-bit address
into the Address Counter and sets it to address the DD RAM. Data is then written to or read from
the MCU for DD RAM. Henceforth, the contents of the Address Counter will be automatically
modified after each access of DD RAM, as selected by the ‘Entry Mode set’ instruction.
Instruction execution time is 37µS.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 1 ADR ADR ADR ADR ADR ADR ADR
DB7 – DB0 -- 80H to CFH for one line display DB7 – DB0 -- 80H to A7H for line one of two-line
display DB7 – DB0 -- C0H to E7H for line two of two-line display § DD RAM / CG RAM DATA
WRITE This instruction writes the data in DB7 to DB0 into either the CG RAM/ DD RAM,
depending on the last executed ‘Set CG RAM address’ or ‘Set DD RAM address’ instruction, and
the parameters of the instruction. Henceforth, the contents of the Address Counter will be
automatically modified as per the ‘Entry Mode set’ instruction, after each data write operation.
Instruction execution time is 37µS.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
1 0 DATA DATA DATA DATA DATA DATA DATA DATA
. DB7 to DB0 Data to be written § DD RAM / CG RAM DATA READ The instruction reads data
DB7 to DB0 from CG RAM / DD RAM depending on the type of ‘Set RAM address’ instruction
last executed. Prior to inputting this read instruction, either the CG RAM address set instruction or
the DD RAM address set instruction must be executed. If it is not done, the first read data becomes
invalid, and data of the next address is read normally from the second read. Henceforth, the
contents of the Address Counter will be automatically modified as per the ‘Entry Mode set’
instruction, after each data read operation. Instruction execution time is 37µS.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
1 1 DATA DATA DATA DATA DATA DATA DATA DATA
DB7 to DB0 Data to be read § READ BUSY FLAG (BF) / ADDRESS COUNTER This instruction
gives the current value of the Address Counter and the busy flag status. BF set to 1 indicates that
the internal operation is in progress, and the next instruction will be accepted only after BF is reset
to 0. The next seven bits point to a location, either in CG RAM or DD RAM depending on the ‘Set
RAM address’ instruction last executed. Instruction execution time is 1µS.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
…wetpaint.com/page/User+Manual 8/28
RS
2/28/2011 R/W DB7 DB6 DB5- Crystalonics
User Manual DB4 Displays
DB3(P) … DB2 DB1 DB0
0 1 BF AC AC AC AC AC AC AC
BF – BUSY FLAG: AC – ADDRESS COUNTER VALUE DB6 to DB0 gives the address NOTE:
Instruction execution time changes when frequency changes. (C) INITIALIZATION FLOW FOR
8 BIT AND 4 BIT LCD MODULES
Power ON
Power ON
Wait for 15 millisecond or more After VDD rises to 4.5V
Wait for 15 millisecond or more After VDD rises to 4.5V

RS R/W DB7 DB6 DB5 DB4 (Set interface length 8 bit) 0 0 0 0 1 1


Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 X X X X
Wait for more than 4.1 µS

RS R/W DB7 DB6 DB5 DB4 (Set interface length 8 bit) 0 0 0 0 1 1


Wait for more than 4.1 µS
Wait for more than 100 µS
Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 X X X X

RS R/W DB7 DB6 DB5 DB4 (Set interface length 8 bit) 0 0 0 0 1 1

Wait for more than 100 µS


Check for busy flag or give a time delay of 2ms
Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 X X X X
RS R/W DB7 DB6 DB5 DB4 (Set interface length 4 bit) 0 0 0 0 1 0
Check for busy flag or give a time delay of 2ms
Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 N F X X
Check for busy flag or give a time delay of 2ms
Set Display OFF RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 1 0 0 0
Check for busy flag or give a time delay of 2ms
Set Display Clear RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 0 0 1
Check for busy flag or give a time delay of 2ms
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 (Set interface length 4 bit) 0 0 0 0 1 0 0 0 N F X X
RS R/W DB7 DB6 DB5 DB4 (Set Display OFF) 0 0 0 0 0 0 0 0 1 0 0 0
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 (Set Display Clear) 0 0 0 0 0 0 0 0 0 0 0 1

Check for busy flag or give a time delay of 2ms

…wetpaint.com/page/User+Manual 9/28
2/28/2011 User Manual - Crystalonics Displays (P) …
RS R/W DB7 DB6 DB5 DB4 (Set Entry Mode) 0 0 0 0 0 0 0 0 0 1 I/D S
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 (Set Display Clear & cursor 0 0 0 0 0 0 returns to home position) 0
0 0 0 0 1 End of Initialization
Check for busy flag or give a time delay of 2ms
Set Entry Mode RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 1 I/D S
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 0 0 1 SetDisplay Clear & cursor
returns to home position. End of initialization

INITIALIZATION BY INTERNAL RESET CIRCUIT 4.5V

0.2V VDD 0.2V 0.2V TOFF

TRON 0.1 ms ≤ TRON ≤ 10ms TOFF ≥ 1ms POWER SUPPLY RESTRICTION TRON – Power
Supply Rise Time TOFF – Power Supply OFF Time If the electrical characteristics of the power
supply meet the above specification, the internal reset circuit automatically initializes the
controller IC when the power is turned on. The busy flag is kept in the busy state (BF = 1) until the
initialization ends. The busy state lasts for 15ms after VDD rises to 4.5V. The following
instructions are executed by default, during the internal initialization routine: § Display Clear §
Function Set: DL = 1 ; 8 Bit Data Interface N = 0 ; 1 Line Display F = 0 ; 5x8 Dot Character Font §
Display on/off control: D = 0 ; Display off C = 0 ; Cursor off B = 0 ; Blinking off § Entry Mode
Set: I/D = 1 ; Increment by one S = 0 ; No Shift § DD RAM is selected After power on, if the
Display is not initialized automatically, initialization by instruction should be carried out. (D)
FUNCTIONAL DESCRIPTION OF THE CONTROLLER IC Registers: The controller IC has
two 8-bit registers, an Instruction Register (IR) and a Data Register (DR). The IR stores the
instruction codes and address information for DD RAM and CG RAM. The IR can be written, but
not read by the Micro Controller Unit (MCU). The DR temporarily stores the data to be written to /
read from the DD RAM or CG RAM. The data written to DR by the MCU is automatically written
to the DD RAM or CG RAM as an internal operation. When an address code is written to IR, the
data (of the specified address) is automatically transferred from the DD RAM or CG RAM to the
DR. Data transfer between the MCU is then completed when the MCU reads the DR. Likewise, for
the next MCU read of the DR, data in DD RAM or CG RAM at the next address is sent to the DR
automatically. Similarly, for the MCU write of the DR, the next DD RAM or CG RAM address is
selected for the write operation. The Register Selection table is as shown below: RS R/W
Operation 0 0 IR write as an internal operation 0 1 Read Busy Flag (DB7) and Address Counter
(DB0 to DB6) 1 0 DR write as an internal operation (DR to DD RAM or CG RAM) 1 1 DR read as
an internal operation (DD RAM or CG RAM to DR) Busy Flag: When the busy flag is 1, the
controller is in the internal operation mode and the next instruction will not be accepted. When RS
= 0 and R/W = 1, the busy flag is output from DB7. The next instruction must be written after
ensuring that the busy flag is 0. Address Counter: The Address Counter allocates the address for
the DD RAM and CG RAM Read/Write operation. When the instruction code for a DD RAM
address or CG RAM address setting, is input to the IR, the address code is transferred from IR to
the Address Counter. After writing/reading the display data to/from the DD RAM or CG RAM, the
Address Counter increments/decrements the address by one, as an internal operation. The data of
…wetpaint.com/page/User+Manual 10/28
2/28/2011 User Manual - Crystalonics Displays (P) …
the Address Counter is output to DB0 to DB6 while R/W = 1 and RS = 0. (E) DD RAM
LOCATIONS The DD RAM is used to store display data of 8 bit character codes present in the
Character Font Table. The DD RAM address corresponds to specific display position on the LCD.
The DD RAM address should be set in the Address Counter, so as to enable the display of
characters on the LCD. DD RAM address is set in the Address Counter (AC) as a hexadecimal
number. MSB DD RAM Address LSB
1 AC6 AC5 AC4 AC3 AC2 AC1 AC0
Note: The DD RAM address is a 7-bit address; the 1 in the MSB is for the controller to identify the
DD RAM address (Ref set DD RAM address instruction in the IV (B) instruction codes)DD RAM
can store a maximum of 80 characters, 01 02 03 04 05 … 78 79 80 80 81 82 83 84 … CD CE CF
(DD RAM Address)

DD RAM ADDRESSES FOR THE DIFFERENT


CRYSTALONICS DISPLAY MODULES:
1 line x 8 characters Display Mode 2 line x 8 characters Display Mode
80 81 82 83 84 85 86 87 LINE1 LINE1 LINE2
80 81 82 83 84 85 86 87 1 line x 16 characters Display Mode (For CDM
C0 C1 C2 C3 C4 C5 C6 C7 16116 Module)
80 81 82 83 84 85 86 87 C0 C1 C2 C3 C4 C5 C6 C7
2 line x 16 characters Display Mode
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F LINE
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF 1
LINE 2
2 line x 20 characters Display Mode
80 81 82 83 84 85 86 87 --- --- --- 8F 90 91 92 93 LINE
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- CF D0 D1 D2 D3 1
LINE 2
4 line x 20 characters Display Mode
80 81 82 83 84 85 86 87 --- --- --- 8F 90 91 92 93 LINE
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- CF D0 D1 D2 D3 1
94 95 96 97 98 99 9A 9B --- --- --- A3 A4 A5 A6 A7 LINE
D4 D5 D6 D7 D8 D9 DA DB --- --- --- E3 E4 E5 E6 E7 2
LINE 3 LINE 4
1 line x 32 characters Display Mode
80 81 82 83 84 85 86 87 88 --- --- 9B 9C 9D 9E 9F
2 line x 40 characters Display Mode
80 81 82 83 84 85 86 87 --- --- --- A3 A4 A5 A6 A7 LINE
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- E3 E4 E5 E6 E7 1
LINE 2
4 line x 40 characters Display Mode
80 81 82 83 84 85 86 87 --- --- --- A3 A4 A5 A6 A7 LINE
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- E3 E4 E5 E6 E7 1
80 81 82 83 84 85 86 87 --- --- --- A3 A4 A5 A6 A7 LINE

…wetpaint.com/page/User+Manual 11/28
2/28/2011 User Manual - Crystalonics Displays (P) …
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- E3 E4 E5 E6 E7 2
LINE 3 LINE 4
Note: Two controllers are required for the 4 line x 40 characters displays. The first one controls
the top 2 lines and the second controls the bottom 2 lines. They share all I/O lines except the “E”
signal. Hence independent “E” signals should be applied to the controllers. Example for Display
Shift using 2 line x 8 characters Display Mode: Before executing Shift
80 81 82 83 84 85 86 87 LINE 1 LINE 2 Display Shifted Left (S/C = 1, R/L
C0 C1 C2 C3 C4 C5 C6 C7 =0.Ref IV (B) Instruction Code Curser/Display Shift)
81 82 83 84 85 86 87 88 LINE 1 LINE 2 Display Shifted Right (S/C = 1, R/L =
C1 C2 C3 C4 C5 C6 C7 C8 1.Ref IV (B) Instruction Code Curser/Display Shift)
A7 80 81 82 83 84 85 86 LINE 1 LINE 2 (F) CG RAM PROGRAMMING
E7 C0 C1 C2 C3 C4 C5 C6 The CG RAM allows the user to create special
characters or symbols, using software. For 5x8 dot format, 8 character patterns and for 5x10 dot
format, 4 character patterns can be programmed. These characters can be accessed as if they were
in the CG ROM. These special characters can be displayed by mentioning the character codes 00H
—07H or 08H—0FH (Ref IV (G) Character font table). Thus the CG RAM expands the character
representation available to the user. For 5 x 8 DOT CHARACTER PATTERN: Programming
Character Patterns in the CG RAM: Enter the CG RAM address, using the instruction “Set CG
RAM Address”. The three bits of CG RAM address, bits 0-2, correspond to the line position of
each character pattern. Using the instruction “CG RAM data write”, enter the character pattern data,
line by line. The data bus lines DB0-DB7, correspond to CG RAM data bits 0-7. The CG RAM
address would be automatically incremented/ decremented as per the entry mode set instruction
executed. The corresponding pixels of the character pattern is activated if it is set to 1 and not
activated if it is set to 0. The last line of the character pattern that is the cursor position should all
be 0s. Displaying character patterns on the LCD: The CG RAM is selected, when the four higher
order bits (bit 4-bit 7), of the 8 bit character codes, are all 0s. When the character pattern’s
8-bit character code is written to the corresponding DD RAM address of the display, the
special characters are displayed. The limitation of 8 special characters can be overcome by
creating a library of customs symbols, with each set totaling 8 characters. These 8
characters can be displayed at one go, by reloading the CG RAM with different sets of
character patterns. This is a RAM, and must be programmed if display power is interrupted.
If used regularly, programming can be made part of the initialization routine. CG RAM, DD
RAM, and pattern examples for 5 x 8 Dot character patterns
Character Codes (DD RAMCG RAM Address Character Patterns (CG Character
Data) RAM Data) Pattern Example
7 6 5 4 3 2 1 0 High Low 5 4 3 2 1 0 High Low 7 6 5 4 3 2 1 0 High Low (1) Cursor
0000*000 0 0 0 0 0 0 0 0 0 0 0 1 * * * 1 1 1 1 1 * * * 1 0 0 Position
0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 * * * 1 0 0 0 0 * * * 1 Character
0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 * * * 1 0 0 0 0 * * Pattern Example
0110000111 * 1 0 0 0 0 * * * 1 1 1 1 1 (2) Cursor
***00000 Position
0000*001 001000001001 ***00100***011
0 0 1 0 1 0 0 0 1 0 1 1 0 1 0 * * * 0 1 1 1 0 * * * 0 Character
0 1 1 0 0 0 0 1 1 0 1 0 0 1 1 1 0 * * * 0 1 1 1 0 * * Pattern Example
1110001111 * 1 1 1 1 1 * * * 0 0 1 0 0 (8) Cursor
***00000 Position *
…wetpaint.com/page/User+Manual 12/28
2/28/2011 User Manual - Crystalonics Displays (P) …
0000*010 0 1 0 0 0 0 0 1 0 0 0 1 * * * 1 0 0 0 1 * * * 1 1 0 Don’t Care
11 Notes: §
0000*111 1 1 1 1 0 1 1 1 1 1 1 0 1 * * * 0 0 1 0 0 * * * 0 1 0 1 Character code
11111 0***11011 bits 0-2
correspond to CG RAM address bits 3-5 for a total of 8 patterns. § CG RAM address codes 0-2
designate character pattern line. The 8th line is the cursor position. It is logically ‘OR’ed with the
cursor instruction. § Character patterns are loaded in to CG RAM data bits 0-4 as shown in the
table. Since CG RAM bits 5-7 are not used, they may be used for general data RAM. § CG RAM
patterns are displayed on the LCD when character code bits 4-7 are all “0”. Bit 3 is a don’t care bit.
Therefore, character pattern (1) can be selected with character code 00H or 08H. § “1” in the
character pattern turns a dot “ON”. “0” indicates a non-selected dot. Flow of CG RAM
programming:
Set DD RAM Data
Set DD RAM Address
Set CG RAM Address
Set CG RAM Data
Initialize the LCD

(G) CHARACTER FONT TABLE


V PRECAUTIONS (A) POWER SUPPLY PRECAUTIONS § Always check the
absolute maximum rating of the LCD driver. § The polarity of the supply voltage should not be
reversed. § Use a clean power source free from transients. § The ground terminal of the power
supply must be isolated properly so that no voltage is induced in it. § The module should be
isolated from the other circuits, so that stray voltages are not induced, which could cause a
flickering display. § The +5V power for the module should also supply the power to all devices,
which may access the display. Don’t allow the data bus to be driven when the logic supply is
disabled. § VDD must, at all times, exceed the VL voltage level. Do not install a capacitor between
the VL pin and ground. The capacitor combines with the contrast potentiometer to form an R-C
network, which “holds-up” VL, at the power-down, damaging the module. (B) MECHANICAL
PRECAUTIONS § Cover the display surface with a transparent protective plate, to protect the
polarizer. § Mount the module so that it is free from torque and physical loads. § Do not use
organic solvents to clean the display panel as these may adversely affect the polarizers. Dust may
be removed by adhesive tape or with absorbent cotton and petroleum benzene. § Ensure that the
soldering is proper, as dry soldering causes improper character display. § The processing or even a
slight deformation of the claws of the metal frame will have effect on the connection of the output
signal and cause an abnormal display. § Do not damage or modify the pattern writing, or drill
attachment holes in the PCB. When assembling the module into another equipment, the space
between the module and the fitting plate should have enough height, to avoid causing stress to the
module surface. § Make sure that there is enough space behind the module, to dissipate the heat
generated by the IC’s while functioning for longer durations. § Employ anti-static procedures while
handling the module. (C) ENVIRONMENTAL PRECAUTIONS § Prevent moisture build-up on
the module. § Contact with water or oil over a long period of time may cause deformation or color
fading of the display. Condensation on the terminals can cause electro-chemical reaction disrupting
the terminal circuit. § Operate the LCD module under the relative condition of 40ºC and 50%
…wetpaint.com/page/User+Manual 13/28
2/28/2011 User Manual - Crystalonics Displays (P) …
relative humidity. Lower temperature can cause retardation of the blinking speed of the display,
while higher temperatures make the overall display discolor. Polarization degradation, bubble
generation or polarizer peel off may occur with high temperature and humidity. § Do not store in
direct sunlight. (D) OPERATING PRECAUTIONS § A module should not be inserted or
removed from a live circuit. § Minimize the cable length between the module and the host. Long
lengths may introduce noise or damaging voltages due to antenna-effect. § Don’t touch the display
surface with bare hands or any hard materials. This will stain the display area and degrade the
insulation between terminals. VI TROUBLESHOOTING q No Data is displayed § Check if the
power supplied (VDD, VL, VSS) is as per the Data sheet specification. § Check the Interface
connections. Ensure that there are no I/O pads bridged. § Check the supply current. Ensure IC’s and
resistors are not heated. Immediately turn off the power before checking the connection, if it is
heated. q Improper initialization § Check if the initialization routine is as per the Data Sheet. § See
if the system is operated without making a BUSY FLAG check. If so, make a BUSY FLAG Check. §
Check if the interface pins (RS, R/W, E and DB0-DB7) are connected properly or not. § Check the
signal timings. Check that all setup times are followed. q Improper Character Display § When the
characters to be displayed are missing in between, the data read/write is too fast. A slower
interfacing frequency would rectify the problem. § If a character not found in the font table is
displayed, or a character is missing, the CG ROM is faulty and the controller IC has to be changed.
§ In a multi line display, if the display of characters in the subsequent lines doesn’t take place
properly; send proper DD RAM Addresses in the initialization code. § The display ON / OFF flag is
turned OFF by the internal initialization routine. This flag has to be explicitly turned ON and it is
always better to send an initialization routine after power up. § If particular pixels of the characters
are missing, or not getting activated properly, there could be an assembling problem in the module.
q Data cannot be read § Check if the connections and polarity of RS and R/W are as per the manual
specification. § Check if there is a contention between any peripheral equipment and the data bus.
§ Check the signal timings. Check that all setup times are followed. § See if the system is operated
without making a BUSY FLAG check. If so, make a BUSY FLAG Check. § Check for errors in the
software. q In case any other problems are encountered, you could send the module to our factory
for testing and evaluation.
CRYSTALONICS DISPLAYS Bright FutureD

CONTACT INFORMATION: CRYSTALONICS DISPLAYS (P) LTD Plot No. 38, SIPCOT
Industrial Complex, Phase II, Kumudepalli Post, Hosur - 635 109, Tamil Nadu. Telephone: 04344-

CDM - USER’S
260389 / 260199 Telefax: 260391. E-Mail id:

MANUAL CONTENTS I FEATURES OF CRYSTALONICS


DISPLAY MODULES II GENERAL VIEW OF AN LCD (A) INTRODUCTION (B) ELECTRO
OPTICAL CHARACTERISTICS OF THE LCD’S (C) BACKLIGHTING (D) PIN DETAILS (E)
ORDERING INFORMATION III HARDWARE DESCRIPTION (A) POWER SUPPLY
REQUIREMENTS (B) INTERFACING (C) TIMING ASPECTS OF LCD’S IV SOFTWARE
DESCRIPTION (A) INTRODUCTION (B) INSTRUCTION CODES (C) INITIALIZATION FLOW
FOR 8 BIT AND 4 BIT LCD MODULES (D) FUNCTIONAL DESCRIPTION OF THE
CONTROLLER IC (E) DDRAM LOCATIONS (F) CGRAM PROGRAMMING (G) CHARACTER
FONT TABLE V PRECAUTIONS (A) POWER SUPPLY PRECAUTIONS (B) MECHANICAL
…wetpaint.com/page/User+Manual 14/28
2/28/2011 User Manual - Crystalonics Displays (P) …
PRECAUTIONS (C) ENVIRONMENTAL PRECAUTIONS (D) OPERATING PRECAUTIONS VI
TROUBLESHOOTING

I FEATURES OF CRYSTALONICS DISPLAY MODULES q Displays Alphanumeric


Characters, Special symbols & characters q Easy interface with a 4-bit or 8-bit MCU q Built-in Dot
Matrix LCD Controller with font 5x8 or 5x10 Dots q Built in Display Data RAM (DD RAM),
Character Generator RAM (CG RAM) and Character Generator ROM (CG ROM) q Automatic
power on Reset q Low power consumption q Various instruction functions q High contrast ratio q
Wide viewing angle q Rapid response time q With & without Backlight q High quality standards q
Long life q Custom made LCD’s q Wide temperature range * q C-Dot Approved * * Applies for
selected Modules only. II GENERAL VIEW OF AN LCD (A) INTRODUCTION The Liquid
Crystal Display (LCD) is a thin layer of ”Liquid Crystal Material” deposited between two plates of
glass. LCD’s have materials, which combine the properties of both Liquids and Crystals. Rather
than having a melting point, they have a temperature range with in which the molecules are almost
as mobile as they would be in a Liquid, but are grouped together in an ordered form similar to a
Crystal. An LCD consists of two glass panels, with the liquid crystal material sandwiched in
between them. The inner surfaces of the glass plates are coated with transparent electrodes, which
define the character, symbols or patterns to be displayed. Polymeric layers are present in between
the electrodes and the liquid crystal, which makes the liquid crystal molecules to maintain a
defined orientation angle. There are polarizers on the glass panels. These polarizers rotate the light
rays passing through them to a definite angle in a particular direction. When LCD is in the off state
light rays are rotated by the two polarizers and the liquid crystal, such that the light rays come out
of the LCD without any orientation, and the LCD appears transparent. When sufficient voltage is
applied to the electrodes, the liquid crystal molecules would be aligned in a specific direction. The
light rays, which are rotated by polarizers passing through the LCD, would result in highlighting the
specific character. Since LCD’s consume less power they are compatible with low power
electronic circuits, and can be powered for long durations. The LCD’s have a long life and wide
operating temperature range between -20°C and +70°C. The LCD’s are lightweight with only a few
millimeters thickness. LCD’s do not generate light. So light is required to read the display. Hence
Displays are readable both day and night by selecting a backlight option. LCD’s are extensively
used in segment displays like Watches, Calculators, Clock, Camera, Audio Equipments, Home
Appliances, Instruments, Telephones, Automobiles, and Games etc. Recent advances in LCD
technologies have resulted in LCD’s being extensively used in telecommunications and consumer
electronics. The LCD’s have even started replacing Cathode Ray Tubes (CRTs) used for the display
of text and graphics, and also in TV applications. An LCD module is selected depending on § The
size and format required in displaying the desired information. § The optical characteristics that
looks best in the module. Alphanumeric modules display characters, numerals, symbols and some
limited graphics. Interface is achieved via a bi-directional, parallel ASCII data bus. Necessary
features such as Character generation RAM (CG RAM), Display Device RAM (DDRAM)
addressing, cursor scrolling, Blanking, User programmable fonts and Handshake are all included.
These modules are the simplest and most economic means to communicate between any micro
system and the outside world. Alphanumeric modules ranges One, two or four character lines are
possible. Most formats are available in a variety of packages to meet various mounting
requirements. Selecting the exact version of an LCD once the format is decided is largely a
subjective judgment. Color, fluid type and backlighting determine the overall look of the display
…wetpaint.com/page/User+Manual 15/28
2/28/2011 User Manual - Crystalonics Displays (P) …
and often the appearance of the final product. Operating condition such as temperature, lighting
condition and available power are also factors in determining the type of display to be used. (B)
ELECTRO OPTICAL CHARACTERISTICS OF THE LCD’S The Electro-Optical
characteristics of the LCD’s depend on the type of fluid used. The fluid type determines the
contrast ratio, viewing angle and temperature range of an LCD. The widely used types are Twisted
Nematic (TN Standard type) and Super Twisted Nematic (STN premium high contrast type). TN
Fluid TN fluid is the least expensive type. The viewing angle is about 40-45°,and must be
designated “top”’ or “bottom” view preference. Bottom view is used when the user will be below
the plane perpendicular to the display, such as on a desk calculator. Top view is used when the
display is mounted on a vertical surface below eye level. STN Fluid STN is a high contrast and
wide viewing angle fluid. The viewing angle is about 75° and it can be viewed above and below the
plane perpendicular to the display.

Viewing Angle and Direction

The viewing angle can be defined as the cone subtended by the viewers eye, when the Display is
viewed at the two extreme angles while having a readable contrast level. The viewing direction can
be defined as the viewers eye direction with respect to the normal drawn perpendicular to the
display’s surface. When the display is viewed from above the normal, it is termed as top view (12
O’ Clock). When viewed from below the normal, it is termed as bottom view (6 O’ clock).
Generally, the Displays used are of the bottom view type. A1 – Approximate Nominal viewing cone
(Top & Bottom view) for TN type. B1 – Approximate Adjustable viewing cone (Top & Bottom
view) for TN type. A2 – Approximate Nominal viewing cone for STN type. B2 - Approximate
Adjustable viewing cone for STN type.Brightness Brightness of LCD is a ratio of the luminance of
the reflected or transmitted light to the luminance of the incident light. Reflective display will
therefore tend to appear rather gray/dark. Brighter display can be obtained by providing
backlighting. Contrast Ratio Contrast Ratio of LCD is a ratio of brightness of the non-activated
pixels to that of the activated pixels. Contrast Ratio = Brightness of Non-activated pixels (B2)
Brightness of activated pixels (B1) B1 B2 SET POINT DRIVING VOLTAGE Brightness &
Contrast, both depend on the polarizers used. Low efficiency polarizers give bright displays but low
contrast. High efficiency polarizers give high contrast and less brightness. Illumination Modes In
normal version LCD’s, ambient light falls on the display and the reflector present on the backside
of the rear glass reflects the light making the characters readable. In the backlight version of
LCD’s, a light source usually LED array behind the glass panel provides the light for reading the
characters. The TN type LCD, which is used widely in the normal / non-backlight version, comes
with grey background color. This type is not generally preferred for the backlighted version. The
STN type LCD, which is rapidly replacing the older TN type, comes in different types. These are
available in grey as well as green colors. For the backlighted version, these types of LCD’s are
preferred. LCD’s operating in an extended temperature range are also available. Temperature
Ranges
Normal Temperature Range LCDExtended Temperature Range LCD
Operating 0 deg C to +50 deg C -20 deg C to +70 deg C
Temperature
Storage Temperature -20 deg C to +70 deg C -30 deg C to +80 deg C
(C) BACKLIGHTING Backlighting is used on LCD’s to make them readable in low light

…wetpaint.com/page/User+Manual 16/28
2/28/2011 User Manual - Crystalonics Displays (P) …
conditions. Generally, there are two methods to backlight character LCD module: (1) Electro
luminescent (EL) and (2) Light Emitting Diode (LED). Selection depends on desired color,
available power and required life. The widely used backlighting is of the LED Array Type. Light
Emitting Diode (LED) LED backlighting offers a significant life advantage over EL lamps, but at
the expense of power and module size. Lamp life is in excess of 50,000 hours, and in most cases, 1
lamp failing does not make the backlight unusable. The absence of any noise/interference, a typical
lifetime of 100,000 hours on an average, the low DC drive voltage of 5V and the various color
options available makes the LED backlighting the widely used one. Standard color is yellow-green,
red, amber and other colors may be special ordered. Since the sensitivity of the eye is maximum at
around 550 nm, the yellow green color backlighting is most widely used. The electro-optical
characteristics of the LED array are given below. There are two types of LED backlights: (1)
Edgelit Style (2) Array Style Edgelit can be used on modules up to 20 characters wide. Beyond 20
characters, the middle of the display begins to dim when compared to the edges. Edgelight type
consumes lesser power compared to array type. Array backlighting produces brighter and more
even light. Power is the main consideration when designing with this type of from 8 to 40
characters per line. module. It is not recommended for battery-powered applications where the
lamp will be on all the time. Variable brightness can be controlled with a digital potentiometer or
pulse-width modulated circuit. (D) PIN DETAILS Pin No. Symbol Description Pin 1 VSS
Ground Terminal, 0V Pin 2 VDD Supply Terminal, +5V Pin 3 VL Liquid Crystal drive voltage Pin 4
RS Register Select: RS = 0 – Instruction Register RS = 1 – Data Register Pin 5 R/W Read / Write:
R/W = 1 – Read R/W = 0 – Write Pin 6 E Enable: Enables Read / Write Pin 7 DB0 Bi-directional
data bus: To to When interface data length is 8 bits, Pin 14 DB7 data transfer is done once through
DB0 - DB7. When the interface data length is 4 bits, data transfer is done twice through DB4 –
DB7. Pin 15 BACKLIGHT In case of 15 pin modules, Pin15 is the Pin 16 SUPPLY supply voltage
(+5V) for the LED. In case of 16 pin modules, Pin15 is the Ground (0V) and Pin16 is the Supply
Voltage (+5V) for the LED.

(E) ORDERING INFORMATION


CDM 1 2 3 4 5 6 7 8 9 10 11 12 13 1-5 --- Model Number
1&2 --- Number of Characters 3 --- Number of Lines 4&5 --- Duty Factor 6 --- Model
Identification / Character Size Can be Blank. 7&8 --- Type of LCD TN -- Twisted Nematic STN --
Super Twisted Nematic 9&10 --- Background Color GY -- Gray GN -- Green 11&12 ---
Illumination Mode BL -- LED Backlight NL -- Normal 13 --- Temperature Range N -- Normal W --
Wide NOTE: 1. For some models only 5-digit model number after CDM will reflect on the PCB.
For example CDM 16116. 2. Some Models will have 5-digit + 1 character will reflect on the PCB.
3. The remaining code from 7 to 13 will be on a written sticker. III HARDWARE
DESCRIPTION (A) POWER SUPPLY REQUIREMENTS The supply should be of
+5V at 1 to 10 milliamps. To achieve a better / suitable contrast for the display, the driver voltage
(VL) at Pin3 should be adjusted properly. Extended temperature and some high contrast modules
require –5V,also at low current. Inexpensive IC’s convert +5V to –5V efficiently. If the display has
backlighting, required power must also be budgeted. The power supply does not have to “lock-on”
+5V but it must not “spike” beyond the module’s absolute maximums. A module’s logic circuits
have 3 connections to the power supply: VDD (+5V DC); VSS (Ground); and VL (Contrast or bias
…wetpaint.com/page/User+Manual 17/28
2/28/2011 User Manual - Crystalonics Displays (P) …
control or viewing angle adjustment voltage). Recommend the end user to use variable resistor as
shown in the circuit for optimum VLCD (VDD-VL) adjustments to obtain best display contrast and
viewing angle. Power Supply for single supply voltage Power Supply for Dual supply voltage
VDD VL VSS
VDD VL VSS

+5VDC +5VDC -5VDC 0VDC 0VDC +5VDC Input LCD Module ±5VDC Input LCD Module

(B) INTERFACING LCD modules can communicate bi-directionally within the master system.
Tie the device into the system data bus & treat it as RAM, I/O, or expanded, parallel I/O. The
module is “selected” by gating a decoded, “module-address” output, with the host processor’s “read
or write” strobe. The resultant signal, applied to the LCD’s “enable” input, clocks in the data. Since
there is no conventional “chip-select” signal, developing a strobe signal for the Enable signal (E)
and applying appropriate signals to the Register Select (RS) and Read / Write (R/W) signals are
important. Interfacing the module involves: (1) Joining the module to the host’s data bus. (2)
Developing a “strobe” signal for the “E” signal. (3) Applying appropriate signals to module’s “RS”
and “R/W”. (4) Applying the proper “viewing angle” voltage to the display’s VL pin. For 4-bit data
interface, the bus lines DB4 to DB7 are used for data transfer, while DB0 to DB3 lines are
disabled. The data transfer is complete when the 4-bit data has been transferred twice. The busy flag
must be checked after the 4-bit data has been transferred twice. For 8-bit data interface, all eight-
bus lines (DB0 to DB7) are used. INTERFACING TO MCU 4-BIT DATA INTERFACE
P1.0 P1.1 MCU P1.2 P3.4 P3.5 P3.6 P3.7
E RS R/W LCD MODULE DB4 DB5 DB6 DB7

8 BIT DATA INTERFACE


E RS R/W LCD MODULE DB0 TO DB7
P1.0 MCU P1.1 P1.2 P3.0 TO P3.7

(C) TIMING ASPECTS OF LCD’S LCD modules must be properly interfaced to the host micro
controller. The modules are classified as a “slow” peripheral. Both access and strobe times exceed
those normally encountered. The Enable (E) signal is the key signal line. The E signal must be a
positive going digital strobe, which is active while data and control information are stable and true.
The falling edge of the E signal enables the data/instruction register of the controller. All module
timings are referenced to specific edges of the E signal. The E signal is applied only when a
specific module transaction is desired. The Read and Write strobes of the host, which provides the
E signal, should not be linked to the module’s R/W line. An address bit, which sets up earlier in the
host’s Machine Cycle, can be used as R/W. The problem is encountered when the host processor is
running so fast that the strobes are two narrow to serve as the E pulse. In this case: § Prolong these
pulses by using the host’s ‘Ready’ input. § Prolong the host by adding wait states. § Decrease the
host’s crystal frequency. When these options are not viable it will be necessary to latch both data
and control information and then activate the E signal. The module presents no difficulties while
interfacing slower MCU’s.

…wetpaint.com/page/User+Manual 18/28
2/28/2011 User Manual - Crystalonics Displays (P) …
The Relationship between the operation and the combination of RS, R/W

RS R/W E OPERATION
0 0 Write instruction
code
0 1 Read busy flag and
Address Counter
1 0 Write data
1 1 Read data
The Interface timing diagrams and the Read / Write timing diagrams are given below IV
SOFTWARE DESCRIPTION (A) INTRODUCTION Software determines what, how, and where
data is displayed on the LCD. The special features of the built in LCD controller IC are: ¨ Character
Generator ROM (CG ROM) that provides 208 characters with font 5x8 dots and 32 characters with
font 5x10 dots ¨ Character Generator RAM (CG RAM) having a storage function of 8 character
patterns, which can freely be changed by users program ¨ Display Data RAM with a maximum of 80
characters ¨ Bi-directional 8 or 4 bit data bus interface ¨ Automatic reset on power up ¨ Internal
oscillator with an external resistor (No external clock required) ¨ Wide range of instruction
functions including: Display clear, Cursor Positioning, Display or Cursor shift on data entry and
Display ON/OFF. Display Data RAM (DD RAM): The character to be displayed is written into the
DD RAM, in the form of 8 bit character codes present in the character font table. DD RAM can
store a maximum of 80 characters. The display data RAM (DD RAM) that is not used for display
can be used as general data RAM. Depending on the 8-bit character code that is written in to the DD
RAM, LCD will select the character pattern either from Character Generator RAM (CG RAM) or
from Character Generator ROM (CG ROM). Character Generator ROM (CG ROM): The CG
ROM generates 5x8 dot or 5x10 dot character patterns from 8 bit character codes (refer character
font table). It can generate 208, 5x8 dot character patterns and 32, 5x10 dot character patterns.
When an 8-bit character code of the CG ROM is written to the DD RAM, the character pattern of
the CG ROM corresponding to the code is displayed on the LCD display position corresponding to
the DD RAM. Character Generator RAM (CG RAM): In the CG RAM, the user can rewrite
character patterns by program. For 5x8 dots, 8 character patterns can be written and for 5x10 dots,
4 characters patterns can be written. Programming of these character patterns is explained in CG
RAM programming. (B) INSTRUCTION CODES Instruction codes are the control information
sent by the user, through the micro controller, to the IR and DR of the controller IC, present in the
module. Before starting the internal operation, the controller stores the control information
temporarily in these registers. The internal operations are determined by the signals sent from the
MCU, which include RS, R/W, E signal and the Data Bus (DB0-DB7). NOTE
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
RS R/W X X X X X X X X
DATA For Instruction Register / Data register

R/W -- Read / Write § CLEAR DISPLAY

R/W -- 1: Data is read from CG RAM / DD RAM


R/W -- 0: Data is written to CG RAM / DD RAM
RS -- Register Select
…wetpaint.com/page/User+Manual 19/28
2/28/2011 User Manual - Crystalonics Displays (P) …
RS -- 0: Selects Command Register for Reading / Writing
RS -- 1: Selects Data Register for Reading / writing
Loads character code for blank (20H) into all the DD RAM addresses. The cursor returns to
address 0(Address = “80”) and display, if it has been shifted, returns to the original position. i.e.,
display disappears and the cursor goes to the left edge of the display (to the first line if 2/4 line
display module is used). The Cursor is brought to the first position of first line. Instruction
execution time is 1.52ms.
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 0 0 1
DB7 – DB0 -- 01H: Clears the Display and all the DD RAM locations

§ RETURN HOME DB7 – DB0 -- 02H , 03H: The cursor goes to the first position of the first line
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 0 1 X
Returns the cursor to address 0(Address=80) and display, if it has been shifted, to the original
position. The DD RAM contents remain unchanged. Instruction execution time is 1.52ms. §
ENTRY MODE SET I/D = 0: Decrements the address of DD RAM / CG RAM when data is written
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 0 1 I/D S
to or read from DD RAM / CG RAM. Cursor is shifted left on the display. I/D = 1: Increments the
address DD RAM / CG RAM when data is written to or read from DD RAM / CG RAM. Cursor is
shifted right on the display. S = 0: The Display is not scrolled. S = 1: The display scrolls. Direction
of scrolls depends on the value of I/D. DATA DB7 – DB0 -- 04H: Data written from right to left.
Display is not scrolled. DB7 – DB0 -- 06H: Data written from left to right. Display is not scrolled.
DB7 – DB0 -- 05H: Data written from right to left. Display scrolls. DB7 – DB0 -- 07H: Data
written from left to right. Display scrolls. Instruction execution time is 37µS. § DISPLAY ON /
OFF D: The display is ON when D=1, and OFF when D=0. When OFF, the display data remains in
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 0 1 D C B
the DD RAM and can be displayed by setting D to 1. C: The cursor is displayed when C=1, and not
displayed when C=0. The cursor is displayed in the 8th line for the character font selection of 5x8
dots. B: The character indicated by the cursor blinks when B=1. The blinking is displayed as
switching between all black dots (dots ON) and displayed character at a speed of 409.6ms intervals
while the controller IC operates at a clock frequency of 250KHZ. DATA DB7 – DB0 -- 08H
Display OFF DB7 – DB0 -- 0CH Display ON and cursor OFF DB7 – DB0 -- 0EH Display ON and
cursor ON not Blinking DB7 – DB0 -- 0FH Display ON and cursor ON Blinking Instruction
execution time is 37µS. § CURSOR / DISPLAY SHIFT This instruction shifts the cursor / display
to the right or left, without writing or reading the display data. This function is used for correction
or search of display. S/C R/L 0 0 Shifts the cursor position to the left. AC is decremented by one. 0
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 0 1 S/C R/L X X
1 Shifts the cursor position to the right. AC is incremented by one. 1 0 Shifts the entire Display to
the left. Cursor follows the display shift. 1 1 Shifts the entire Display to the right. Cursor follows
the display shift. When the displayed data is shifted repeatedly, each line moves horizontally. The

…wetpaint.com/page/User+Manual 20/28
2/28/2011 User Manual - Crystalonics Displays (P) …
second line display does not shift in to the first line position. The Address Counter contents would
not change, if only, the display shift operation is performed. Instruction execution time is 37µS.
DATA DB7 – DB0 -- 10H: Shifts the cursor position to left DB7 – DB0 -- 14H: Shifts the cursor
position to right DB7 – DB0 -- 18H: Shifts the entire display to left Cursor follows the display
shift DB7 – DB0 -- 1CH: Shifts the entire display to right Cursor follows the display shift §
FUNCTION SET This instruction initializes the system, and must be the first instruction to be
executed after power on. Instruction execution time is 37µS. DL—Sets the interface data length to
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 0 1 DL N F X X
8-bit when DL=1, and 4-bit when DL=0. N – Sets the Number of Display lines F – Sets the
Character fontDATA DB7 – DB0 -- 30H: Sets the display as One Line, 5 X 8 dots character size
and data transfer is 8-Bits DB7 – DB0 -- 34H: Sets the display as One Line, 5 X 10 dots character
size and data transfer is 8-Bits DB7 – DB0 -- 38H: Sets the display as Two Lines, 5 X 8 dots
character size and data transfer is 8-Bits DB7 – DB0 -- 20H: Sets the display as One Line, 5 X 8
dots character size and data transfer is 4-Bits DB7 – DB0 -- 24H: Sets the display as One Line, 5 X
10 dots character size and data transfer is 4-Bits DB7 – DB0 -- 28H: Sets the display as Two Lines,
5 X 8 dots character size and data transfer is 4-Bits Note: This instruction also sets the display as
four lines, 5 X 8 dots character in 4-line display modules. § SET CG RAM ADDRESS This
instruction loads a new 6-bit address into the Address Counter and sets it to address the CG RAM.
Henceforth, the contents of the Address Counter will be automatically modified after each access
of CG RAM, as selected by the ‘Entry Mode set’ instruction. If this instruction is issued by the
system MCU while the display is enabled, and if either the cursor or blink is on, the display will
blink. To avoid this, both the cursor and display blink should be turned off before loading a new CG
RAM address. Instruction execution time is 37µS. DB7 – DB0 -- 40H to 7EH § SET DD RAM
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 0 1 ACG ACG ACG ACG ACG ACG
ADDRESS This instruction loads a new 7-bit address into the Address Counter and sets it to
address the DD RAM. Data is then written to or read from the MCU for DD RAM. Henceforth, the
contents of the Address Counter will be automatically modified after each access of DD RAM, as
selected by the ‘Entry Mode set’ instruction. Instruction execution time is 37µS. DB7 – DB0 --
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 0 1 ADR ADR ADR ADR ADR ADR ADR
80H to CFH for one line display DB7 – DB0 -- 80H to A7H for line one of two-line display DB7 –
DB0 -- C0H to E7H for line two of two-line display § DD RAM / CG RAM DATA WRITE This
instruction writes the data in DB7 to DB0 into either the CG RAM/ DD RAM, depending on the
last executed ‘Set CG RAM address’ or ‘Set DD RAM address’ instruction, and the parameters of
the instruction. Henceforth, the contents of the Address Counter will be automatically modified as
per the ‘Entry Mode set’ instruction, after each data write operation. Instruction execution time is
37µS. . DB7 to DB0 Data to be written § DD RAM / CG RAM DATA READ The instruction reads
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
1 0 DATA DATA DATA DATA DATA DATA DATA DATA
data DB7 to DB0 from CG RAM / DD RAM depending on the type of ‘Set RAM address’
instruction last executed. Prior to inputting this read instruction, either the CG RAM address set
instruction or the DD RAM address set instruction must be executed. If it is not done, the first read
data becomes invalid, and data of the next address is read normally from the second read.
…wetpaint.com/page/User+Manual 21/28
2/28/2011 User Manual - Crystalonics Displays (P) …
Henceforth, the contents of the Address Counter will be automatically modified as per the ‘Entry
Mode set’ instruction, after each data read operation. Instruction execution time is 37µS. DB7 to
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
1 1 DATA DATA DATA DATA DATA DATA DATA DATA
DB0 Data to be read § READ BUSY FLAG (BF) / ADDRESS COUNTER This instruction gives the
current value of the Address Counter and the busy flag status. BF set to 1 indicates that the internal
operation is in progress, and the next instruction will be accepted only after BF is reset to 0. The
next seven bits point to a location, either in CG RAM or DD RAM depending on the ‘Set RAM
address’ instruction last executed. Instruction execution time is 1µS. BF – BUSY FLAG: AC –
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
0 1 BF AC AC AC AC AC AC AC
ADDRESS COUNTER VALUE DB6 to DB0 gives the address NOTE: Instruction execution time
changes when frequency changes. (C) INITIALIZATION FLOW FOR 8 BIT AND 4 BIT LCD
MODULES
Power ON
Power ON
Wait for 15 millisecond or more After VDD rises to 4.5V
Wait for 15 millisecond or more After VDD rises to 4.5V

RS R/W DB7 DB6 DB5 DB4 (Set interface length 8 bit) 0 0 0 0 1 1


Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 X X X X
Wait for more than 4.1 µS

RS R/W DB7 DB6 DB5 DB4 (Set interface length 8 bit) 0 0 0 0 1 1


Wait for more than 4.1 µS
Wait for more than 100 µS
Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 X X X X

RS R/W DB7 DB6 DB5 DB4 (Set interface length 8 bit) 0 0 0 0 1 1

Wait for more than 100 µS


Check for busy flag or give a time delay of 2ms
Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 X X X X
RS R/W DB7 DB6 DB5 DB4 (Set interface length 4 bit) 0 0 0 0 1 0
Check for busy flag or give a time delay of 2ms
Set interface length 8 bit RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 1 1 N F X X
Check for busy flag or give a time delay of 2ms
Set Display OFF RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 1 0 0 0
Check for busy flag or give a time delay of 2ms
Set Display Clear RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 0 0 1
Check for busy flag or give a time delay of 2ms
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 (Set interface length 4 bit) 0 0 0 0 1 0 0 0 N F X X
RS R/W DB7 DB6 DB5 DB4 (Set Display OFF) 0 0 0 0 0 0 0 0 1 0 0 0
…wetpaint.com/page/User+Manual 22/28
2/28/2011 User Manual - Crystalonics Displays (P) …
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 (Set Display Clear) 0 0 0 0 0 0 0 0 0 0 0 1

Check for busy flag or give a time delay of 2ms


RS R/W DB7 DB6 DB5 DB4 (Set Entry Mode) 0 0 0 0 0 0 0 0 0 1 I/D S
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 (Set Display Clear & cursor 0 0 0 0 0 0 returns to home position) 0
0 0 0 0 1 End of Initialization
Check for busy flag or give a time delay of 2ms
Set Entry Mode RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 1 I/D S
Check for busy flag or give a time delay of 2ms
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 0 0 0 0 0 0 0 0 0 1 SetDisplay Clear & cursor
returns to home position. End of initialization

INITIALIZATION BY INTERNAL RESET CIRCUIT 4.5V


0.2V VDD 0.2V 0.2V TOFF
TRON 0.1 ms ≤ TRON ≤ 10ms TOFF ≥ 1ms POWER SUPPLY RESTRICTION TRON – Power
Supply Rise Time TOFF – Power Supply OFF Time If the electrical characteristics of the power
supply meet the above specification, the internal reset circuit automatically initializes the
controller IC when the power is turned on. The busy flag is kept in the busy state (BF = 1) until the
initialization ends. The busy state lasts for 15ms after VDD rises to 4.5V. The following
instructions are executed by default, during the internal initialization routine: § Display Clear §
Function Set: DL = 1 ; 8 Bit Data Interface N = 0 ; 1 Line Display F = 0 ; 5x8 Dot Character Font §
Display on/off control: D = 0 ; Display off C = 0 ; Cursor off B = 0 ; Blinking off § Entry Mode
Set: I/D = 1 ; Increment by one S = 0 ; No Shift § DD RAM is selected After power on, if the
Display is not initialized automatically, initialization by instruction should be carried out. (D)
FUNCTIONAL DESCRIPTION OF THE CONTROLLER IC Registers: The controller IC has
two 8-bit registers, an Instruction Register (IR) and a Data Register (DR). The IR stores the
instruction codes and address information for DD RAM and CG RAM. The IR can be written, but
not read by the Micro Controller Unit (MCU). The DR temporarily stores the data to be written to /
read from the DD RAM or CG RAM. The data written to DR by the MCU is automatically written
to the DD RAM or CG RAM as an internal operation. When an address code is written to IR, the
data (of the specified address) is automatically transferred from the DD RAM or CG RAM to the
DR. Data transfer between the MCU is then completed when the MCU reads the DR. Likewise, for
the next MCU read of the DR, data in DD RAM or CG RAM at the next address is sent to the DR
automatically. Similarly, for the MCU write of the DR, the next DD RAM or CG RAM address is
selected for the write operation. The Register Selection table is as shown below: RS R/W
Operation 0 0 IR write as an internal operation 0 1 Read Busy Flag (DB7) and Address Counter
(DB0 to DB6) 1 0 DR write as an internal operation (DR to DD RAM or CG RAM) 1 1 DR read as
an internal operation (DD RAM or CG RAM to DR) Busy Flag: When the busy flag is 1, the
controller is in the internal operation mode and the next instruction will not be accepted. When RS
= 0 and R/W = 1, the busy flag is output from DB7. The next instruction must be written after
ensuring that the busy flag is 0. Address Counter: The Address Counter allocates the address for
the DD RAM and CG RAM Read/Write operation. When the instruction code for a DD RAM
address or CG RAM address setting, is input to the IR, the address code is transferred from IR to
the Address Counter. After writing/reading the display data to/from the DD RAM or CG RAM, the
…wetpaint.com/page/User+Manual 23/28
2/28/2011 User Manual - Crystalonics Displays (P) …
Address Counter increments/decrements the address by one, as an internal operation. The data of
the Address Counter is output to DB0 to DB6 while R/W = 1 and RS = 0. (E) DD RAM
LOCATIONS The DD RAM is used to store display data of 8 bit character codes present in the
Character Font Table. The DD RAM address corresponds to specific display position on the LCD.
The DD RAM address should be set in the Address Counter, so as to enable the display of
characters on the LCD. DD RAM address is set in the Address Counter (AC) as a hexadecimal
number. MSB DD RAM Address LSB
1 AC6 AC5 AC4 AC3 AC2 AC1 AC0
Note: The DD RAM address is a 7-bit address; the 1 in the MSB is for the controller to identify the
DD RAM address (Ref set DD RAM address instruction in the IV (B) instruction codes)DD RAM
can store a maximum of 80 characters, 01 02 03 04 05 … 78 79 80 80 81 82 83 84 … CD CE CF
(DD RAM Address)

DD RAM ADDRESSES FOR THE DIFFERENT


CRYSTALONICS DISPLAY MODULES:
1 line x 8 characters Display Mode 2 line x 8 characters Display Mode LINE1 LINE1 LINE2
80 81 82 83 84 85 86 87 1 line x 16 characters Display Mode (For CDM
80 81 82 83 84 85 86 87 16116 Module)
C0 C1 C2 C3 C4 C5 C6 C7
80 81 82 83 84 85 86 87 C0 C1 C2 C3 C4 C5 C6 C7
2 line x 16 characters Display Mode LINE 1 LINE 2
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 2
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF line
x 20 characters Display Mode LINE 1 LINE 2
80 81 82 83 84 85 86 87 --- --- --- 8F 90 91 92 93 4
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- CF D0 D1 D2 D3 line
x 20 characters Display Mode LINE 1 LINE 2 LINE 3 LINE 4
80 81 82 83 84 85 86 87 --- --- --- 8F 90 91 92 93 1
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- CF D0 D1 D2 D3 line
94 95 96 97 98 99 9A 9B --- --- --- A3 A4 A5 A6 A7 x 32
D4 D5 D6 D7 D8 D9 DA DB --- --- --- E3 E4 E5 E6 E7
characters Display Mode
80 81 82 83 84 85 86 87 88 --- --- 9B 9C 9D 9E 9F
2 line x 40 characters Display Mode LINE 1 LINE 2
80 81 82 83 84 85 86 87 --- --- --- A3 A4 A5 A6 A7 4
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- E3 E4 E5 E6 E7 line
x 40 characters Display Mode LINE 1 LINE 2 LINE 3 LINE 4
80 81 82 83 84 85 86 87 --- --- --- A3 A4 A5 A6 A7
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- E3 E4 E5 E6 E7
80 81 82 83 84 85 86 87 --- --- --- A3 A4 A5 A6 A7
C0 C1 C2 C3 C4 C5 C6 C7 --- --- --- E3 E4 E5 E6 E7
Note: Two controllers are required for the 4 line x 40 characters displays. The first one controls
the top 2 lines and the second controls the bottom 2 lines. They share all I/O lines except the “E”

…wetpaint.com/page/User+Manual 24/28
2/28/2011 User Manual - Crystalonics Displays (P) …
signal. Hence independent “E” signals should be applied to the controllers. Example for Display
Shift using 2 line x 8 characters Display Mode: Before executing Shift LINE 1 LINE 2 Display
80 81 82 83 84 85 86 87 Shifted Left (S/C = 1, R/L =0.Ref IV (B) Instruction
C0 C1 C2 C3 C4 C5 C6 C7 Code Curser/Display Shift) LINE 1 LINE 2 Display
81 82 83 84 85 86 87 88 Shifted Right (S/C = 1, R/L = 1.Ref IV (B) Instruction
C1 C2 C3 C4 C5 C6 C7 C8 Code Curser/Display Shift) LINE 1 LINE 2 (F) CG
A7 80 81 82 83 84 85 86 RAM PROGRAMMING The CG RAM allows the
E7 C0 C1 C2 C3 C4 C5 C6 user to create special characters or symbols, using
software. For 5x8 dot format, 8 character patterns and for 5x10 dot format, 4 character patterns can
be programmed. These characters can be accessed as if they were in the CG ROM. These special
characters can be displayed by mentioning the character codes 00H—07H or 08H—0FH (Ref IV
(G) Character font table). Thus the CG RAM expands the character representation available to the
user. For 5 x 8 DOT CHARACTER PATTERN: Programming Character Patterns in the CG
RAM: Enter the CG RAM address, using the instruction “Set CG RAM Address”. The three bits of
CG RAM address, bits 0-2, correspond to the line position of each character pattern. Using the
instruction “CG RAM data write”, enter the character pattern data, line by line. The data bus lines
DB0-DB7, correspond to CG RAM data bits 0-7. The CG RAM address would be automatically
incremented/ decremented as per the entry mode set instruction executed. The corresponding
pixels of the character pattern is activated if it is set to 1 and not activated if it is set to 0. The last
line of the character pattern that is the cursor position should all be 0s. Displaying character
patterns on the LCD: The CG RAM is selected, when the four higher order bits (bit 4-bit 7), of the
8 bit character codes, are all 0s. When the character pattern’s 8-bit character code is written to the
corresponding DD RAM address of the display, the special characters are displayed. The limitation
of 8 special characters can be overcome by creating a library of customs symbols, with each set
totaling 8 characters. These 8 characters can be displayed at one go, by reloading the CG RAM with
different sets of character patterns. This is a RAM, and must be programmed if display power is
interrupted. If used regularly, programming can be made part of the initialization routine. CG
RAM, DD RAM, and pattern examples for 5 x 8 Dot character patterns Character Pattern
Character Codes (DD RAM CG RAM Address Character Patterns (CG Example (1)
Data) RAM Data) Cursor Position
7 6 5 4 3 2 1 0 High Low 5 4 3 2 1 0 High Low 7 6 5 4 3 2 1 0 High Low Character
0000*000 0 0 0 0 0 0 0 0 0 0 0 1 0 * * * 1 1 1 1 1 * * * 1 0 0 0 Pattern Example
0 0 0 1 0 0 0 0 0 1 1 0 0 0 * * * 1 0 0 0 0 * * * 1 1 1 (2) Cursor
0 1 0 0 0 0 0 1 0 1 0 0 0 1 0 * * * 1 0 0 0 0 * * * 1 0 Position
110000111 0 0 0 * * * 1 1 1 1 1 * * * 0 Character
0000 Pattern Example
0000*001 0 0 1 0 0 0 0 0 1 0 0 1 0 * * * 0 0 1 0 0 * * * 0 1 1 1 (8) Cursor
0 1 0 1 0 0 0 1 0 1 1 0 0 0 * * * 0 1 1 1 0 * * * 0 1 1 Position * Don’t
1 1 0 0 0 0 1 1 0 1 0 0 1 1 0 * * * 0 1 1 1 0 * * * 1 1 Care Notes: §
110001111 1 1 1 * * * 0 0 1 0 0 * * * 0 Character code
0000 bits 0-2
0000*010 0 1 0 0 0 0 0 1 0 0 0 1 * * * 1 0 0 0 1 * * * 1 1 0 1 correspond to
1 CG RAM
0000*111 1 1 1 1 0 1 1 1 1 1 1 0 1 * * * 0 0 1 0 0 * * * 0 1 0 1 address bits 3-
11111 0***11011 5 for a total of
8 patterns. § CG RAM address codes 0-2 designate character pattern line. The 8th line is the cursor
…wetpaint.com/page/User+Manual 25/28
2/28/2011 User Manual - Crystalonics Displays (P) …
position. It is logically ‘OR’ed with the cursor instruction. § Character patterns are loaded in to CG
RAM data bits 0-4 as shown in the table. Since CG RAM bits 5-7 are not used, they may be used for
general data RAM. § CG RAM patterns are displayed on the LCD when character code bits 4-7 are
all “0”. Bit 3 is a don’t care bit. Therefore, character pattern (1) can be selected with character code
00H or 08H. § “1” in the character pattern turns a dot “ON”. “0” indicates a non-selected dot. Flow
of CG RAM programming:
Set DD RAM Data
Set DD RAM Address
Set CG RAM Address
Set CG RAM Data
Initialize the LCD

(G) CHARACTER FONT TABLE


V PRECAUTIONS (A) POWER SUPPLY PRECAUTIONS § Always check the
absolute maximum rating of the LCD driver. § The polarity of the supply voltage should not be
reversed. § Use a clean power source free from transients. § The ground terminal of the power
supply must be isolated properly so that no voltage is induced in it. § The module should be isolated
from the other circuits, so that stray voltages are not induced, which could cause a flickering
display. § The +5V power for the module should also supply the power to all devices, which may
access the display. Don’t allow the data bus to be driven when the logic supply is disabled. § VDD
must, at all times, exceed the VL voltage level. Do not install a capacitor between the VL pin and
ground. The capacitor combines with the contrast potentiometer to form an R-C network, which
“holds-up” VL, at the power-down, damaging the module. (B) MECHANICAL PRECAUTIONS §
Cover the display surface with a transparent protective plate, to protect the polarizer. § Mount the
module so that it is free from torque and physical loads. § Do not use organic solvents to clean the
display panel as these may adversely affect the polarizers. Dust may be removed by adhesive tape or
with absorbent cotton and petroleum benzene. § Ensure that the soldering is proper, as dry
soldering causes improper character display. § The processing or even a slight deformation of the
claws of the metal frame will have effect on the connection of the output signal and cause an
abnormal display. § Do not damage or modify the pattern writing, or drill attachment holes in the
PCB. When assembling the module into another equipment, the space between the module and the
fitting plate should have enough height, to avoid causing stress to the module surface. § Make sure
that there is enough space behind the module, to dissipate the heat generated by the IC’s while
functioning for longer durations. § Employ anti-static procedures while handling the module. (C)
ENVIRONMENTAL PRECAUTIONS § Prevent moisture build-up on the module. § Contact with
water or oil over a long period of time may cause deformation or color fading of the display.
Condensation on the terminals can cause electro-chemical reaction disrupting the terminal circuit.
§ Operate the LCD module under the relative condition of 40ºC and 50% relative humidity. Lower
temperature can cause retardation of the blinking speed of the display, while higher temperatures
make the overall display discolor. Polarization degradation, bubble generation or polarizer peel off
may occur with high temperature and humidity. § Do not store in direct sunlight. (D) OPERATING
PRECAUTIONS § A module should not be inserted or removed from a live circuit. § Minimize the
cable length between the module and the host. Long lengths may introduce noise or damaging
voltages due to antenna-effect. § Don’t touch the display surface with bare hands or any hard
materials. This will stain the display area and degrade the insulation between terminals. VI
…wetpaint.com/page/User+Manual 26/28
2/28/2011 User Manual - Crystalonics Displays (P) …
TROUBLESHOOTING q No Data is displayed § Check if the power supplied (VDD, VL, VSS) is
as per the Data sheet specification. § Check the Interface connections. Ensure that there are no I/O
pads bridged. § Check the supply current. Ensure IC’s and resistors are not heated. Immediately turn
off the power before checking the connection, if it is heated. q Improper initialization § Check if
the initialization routine is as per the Data Sheet. § See if the system is operated without making a
BUSY FLAG check. If so, make a BUSY FLAG Check. § Check if the interface pins (RS, R/W, E
and DB0-DB7) are connected properly or not. § Check the signal timings. Check that all setup
times are followed. q Improper Character Display § When the characters to be displayed are
missing in between, the data read/write is too fast. A slower interfacing frequency would rectify the
problem. § If a character not found in the font table is displayed, or a character is missing, the CG
ROM is faulty and the controller IC has to be changed. § In a multi line display, if the display of
characters in the subsequent lines doesn’t take place properly; send proper DD RAM Addresses in
the initialization code. § The display ON / OFF flag is turned OFF by the internal initialization
routine. This flag has to be explicitly turned ON and it is always better to send an initialization
routine after power up. § If particular pixels of the characters are missing, or not getting activated
properly, there could be an assembling problem in the module. q Data cannot be read § Check if the
connections and polarity of RS and R/W are as per the manual specification. § Check if there is a
contention between any peripheral equipment and the data bus. § Check the signal timings. Check
that all setup times are followed. § See if the system is operated without making a BUSY FLAG
check. If so, make a BUSY FLAG Check. § Check for errors in the software. q In case any other
problems are encountered, you could send the module to our factory for testing and evaluation.
CRYSTALONICS DISPLAYS Bright Future…
CONTACT INFORMATION: CRYSTALONICS DISPLAYS (P) LTD
PLOT NO 38,SIPCOT PHASE II,
HOSUR, TAMIL NADU, INDIA.
TEL: 04344-260 389/199
FAX: 04344-260391
MOBILE:09944977176
E-Mail: crystalonics@gmail.com & crystalonics@sancharnet.in MARKETING OFFICES:
BANGALORE DIGIPROTEK 403, 6th main, 1st Cross, HAL 2nd Stage, Bangalore -- 560 008.
Telephone: 080- 25266706 / 25272659 / 25262639 Fax: 25263088 E-mail:
sales@digiprotek.com Web Site: www.digiprotek.com NEW DELHI DIGIPROTEK Flat No. 2C,
Masjid Moth-1 G.K. Part III, New Delhi – 110 048 Telephone: 011- 26242297 / 26241604
Telefax: 011 - E-mail: digipro@vsnl.com HYDERABAD DIGIPROTEK No. 28, Suman Housing
Colony, West Marredpally, Secunderabad - 500 026 Telephone: 040 – 55214521 Telefax: 040 -
27807278 E-mail: digiprotek@sify.com All Rights Reserved. © 2003 Crystalonics Displays
Private Limited, India. MARKETING OFFICES: BANGALORE DIGIPROTEK 403, 6th main,
1st Cross, HAL 2nd Stage, Bangalore -- 560 008. Telephone: 080- 25266706 / 25272659 /
25262639 Fax: 25263088 E-mail: sales@digiprotek.com Web Site: www.digiprotek.com NEW
DELHI DIGIPROTEK Flat No. 2C, Masjid Moth-1 G.K. Part III, New Delhi – 110 048 Telephone:
011- 26242297 / 26241604 Telefax: 011 - E-mail: digipro@vsnl.com HYDERABAD
DIGIPROTEK No. 28, Suman Housing Colony, West Marredpally, Secunderabad - 500 026
Telephone: 040 – 55214521 Telefax: 040 - 27807278 E-mail: digiprotek@sify.com All Rights
Reserved. © 2003 Crystalonics Displays Private Limited, India.

…wetpaint.com/page/User+Manual 27/28
2/28/2011 User Manual - Crystalonics Displays (P) …

Latest page update: made by crystalonics , May 10 2008, 4:29 AM EDT (about this update
- complete history)
crystalonics
Keyword tags: None

Like Be the first of your friends to like this.

Share this

Threads for this page

There are no threads for this page. Be the first to start a new thread.

…wetpaint.com/page/User+Manual 28/28