LCD0821
Technical Manual
Revision: 2.1
Contents
Contents
1
ii
Getting Started
1.1 Display Options Available
1.2 Accessories . . . . . . . .
1.3 Features . . . . . . . . . .
1.4 Connecting to a PC . . . .
1.5 Installing the Software . .
1.5.1 uProject . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
2
3
4
5
5
Hardware Information
2.1 Power/Data Connector .
2.2 RS-232 Header . . . . .
2.3 Manual Override . . . .
2.4 General Purpose Output .
2.5 Protocol Select Jumpers .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
6
6
7
7
8
9
3
Troubleshooting
3.1 The display does not turn on when power is applied. . . . . . . . . . . . . . . . . . . . . . .
3.2 The display module is not communicating. . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 The display module is communicating, however text cannot be displayed. . . . . . . . . . .
10
10
10
11
4
Communications
4.1 Introduction . . . . . . . . . . . . . .
4.1.1 I2 C Communication Summary
4.1.2 I2 C Transaction Example . . .
4.1.3 Serial Communication . . . .
4.2 Changing the I2 C Slave Address . . .
4.3 Changing the Baud Rate . . . . . . .
4.4 Setting a Non-Standard Baud Rate . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11
11
11
12
13
13
13
14
Text
5.1 Introduction . . . . . . . . .
5.1.1 Character Set . . . .
5.1.2 Control Characters .
5.2 Auto Scroll On . . . . . . .
5.3 Auto Scroll Off . . . . . . .
5.4 Clear Screen . . . . . . . . .
5.5 Changing the Startup Screen
5.6 Set Auto Line Wrap On . . .
5.7 Set Auto Line Wrap Off . . .
5.8 Set Cursor Position . . . . .
5.9 Go Home . . . . . . . . . .
5.10 Move Cursor Back . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
15
15
16
17
18
18
18
18
19
19
19
20
20
2
5
Matrix Orbital
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
LCD0821
ii
5.11
5.12
5.13
5.14
5.15
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
20
21
21
21
21
Special Characters
6.1 Introduction . . . . . . . . . . . . . . .
6.2 Creating a Custom Character . . . . . .
6.3 Saving Custom Characters . . . . . . .
6.4 Loading Custom Characters . . . . . .
6.5 Save Startup Screen Custom Characters
6.6 Initialize Medium Number . . . . . . .
6.7 Place Medium Numbers . . . . . . . .
6.8 Initialize Horizontal Bar . . . . . . . .
6.9 Place Horizontal Bar Graph . . . . . . .
6.10 Initialize Narrow Vertical Bar . . . . . .
6.11 Initialize Wide Vertical Bar . . . . . . .
6.12 Place Vertical Bar . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
22
22
22
23
24
24
25
25
26
26
26
27
27
General Purpose Output
7.1 Introduction . . . . . . . . .
7.2 General Purpose Output Off
7.3 General Purpose Output On .
7.4 Set Startup GPO state . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
28
28
28
28
29
Display Functions
8.1 Introduction . . . . . . .
8.2 Display On . . . . . . .
8.3 Display Off . . . . . . .
8.4 Set Brightness . . . . . .
8.5 Set and Save Brightness .
8.6 Set Contrast . . . . . . .
8.7 Set and Save Contrast . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
29
29
29
30
30
30
31
31
Data Security
9.1 Introduction . . . . . .
9.2 Set Remember . . . . .
9.3 Data Lock . . . . . . .
9.4 Set and Save Data Lock
9.5 Write Customer Data .
9.6 Read Customer Data .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
32
32
32
33
34
35
35
10 Miscellaneous
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.2 Read Version Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.3 Read Module Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
35
35
35
36
Matrix Orbital
iii
6
7
8
9
Move Cursor Forward . . .
Underline Cursor On . . .
Underline Cursor Off . . .
Blinking Block Cursor On
Blinking Block Cursor Off
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
LCD0821
11 Command Summary
11.1 Communications . . . .
11.2 Text . . . . . . . . . . .
11.3 Special Characters . . .
11.4 General Purpose Output .
11.5 Display Functions . . . .
11.6 Data Security . . . . . .
11.7 Miscellaneous . . . . . .
11.8 Command By Number .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
38
38
38
39
40
40
41
41
41
12 Appendix
12.1 Specifications . . . . . . .
12.1.1 Environmental . .
12.1.2 Electrical . . . . .
12.1.3 Optical . . . . . .
12.2 Physical Layout . . . . . .
12.3 Ordering Information . . .
12.4 Definitions . . . . . . . . .
12.5 Contacting Matrix Orbital .
12.6 Revision History . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
43
43
43
43
43
44
46
46
47
47
Matrix Orbital
LCD0821
iv
1
Getting Started
Figure 1: LCD0821
The LCD0821 is an intelligent LCD display designed to decrease development time by providing an
instant solution to any project. With the ability to communicate via serial RS-232/TTL and I2 C protocols,
the versatile LCD0821 can be used with virtually any controller. The ease of use is further enhanced by an
intuitive command structure to allow display settings such as backlight brightness, contrast and baud rate
to be software controlled. Additionally, up to forty custom characters such as character sets for bar graphs,
medium and large numbers may be stored in the non-volatile memory to be easily recalled and displayed at
any time.
1.1
Display Options Available
The LCD0821 comes in a wide variety of colors including the standard yellow/green or inverse yellow,
the popular blue/white and the crisp white/grey as well as inverse red which is excellent for viewing at night.
Extended voltage, and temperature options are also available, to allow you to select the display which will
best fit your project needs.
Matrix Orbital
LCD0821
1
Figure 2: LCD0821 Options
1.2
Accessories
NOTE Matrix Orbital provides all the interface accessories needed to get your display
up and running. You will find these accessories and others on our e-commerce website at
http://www.matrixorbital.com. To contact a sales associate see Section 12.5 on page 47 for
contact information.
Figure 3: 5V Power Cable Adapter
Matrix Orbital
Figure 4: 12V Power Cable Adapter (V/VPT
Models)
LCD0821
2
Figure 6: Serial Cable 4FT
Figure 5: Breadboard Cable
Figure 7: Communication and 5V Power Cable
1.3
•
•
•
•
•
•
•
•
•
•
•
Features
8 column by 2 line alphanumeric liquid crystal display
Selectable communication protocol, serial at RS-232 or TTL levels or I2 C
One, 5V -20mA, general purpose output for a variety of applications
Lightning fast communication speeds, up to 57.6 kbps for RS-232 and 100 kbps for I2 C
Extended temperature available for extreme environments of -20C to 70C
Extended voltage power supply available
Built in font with provision for up to 8 user defined characters
Up to 127 modules addressable on the same 2 wire I2 C interface
Ability to add a customized splash / startup screen
Software controlled contrast and brightness with configurable time-out setting up to 90 minutes
Horizontal or vertical bar graphs
Matrix Orbital
LCD0821
3
1.4
Connecting to a PC
The LCD0821 connects seamlessly to a PC and it is an excellent means of testing the functionality. To
connect your display to a PC, you will require a standard RS-232 9-pin serial cable such as the one pictured
in figure 6 on the previous page, as well as a modified 5V power adapter such as the one pictured in figure 3 on
page 2.
In order to connect your display to a personal computer follow these easy instructions:
1. Plug the serial cable into the com port you wish to use.
2. Connect the modified 5V power adapter to a power lead from your PC power supply (you will have to
open your computer case).
3. Connect the serial cable to the DB-9 connector on the back of the display.
4. Connect the 5V power adapter to the 4-pin connector on the back of the display.
WARNING DO NOT use the standard floppy drive power connector,
as this will not provide you with the correct voltage and will damage the
display module.
Figure 8: PC vs Matrix Orbital Display Module Wiring
Matrix Orbital
LCD0821
4
1.5
Installing the Software
1.5.1 uProject
uProject was designed by Matrix Orbital to provide a simple and easy to use interface that will allow you
to test all of the features of our alpha numeric displays.
To install uProject from the Matrix Orbital CD, follow the following steps:
1.
2.
3.
4.
Insert the Matrix Orbital CD-ROM into the CD drive
Locate the file, uProject.exe, which should be in the “CD-drive:\Download” directory.
Copy uProject.exe to a directory that you wish to run it from.
Double click on "uProject.exe"
Be sure to check the information selected in the COM Setup the first time uProject is run. Once this information is entered correctly the program can be used to control all functions of the graphic display.
Comport
The serial port the display
is plugged in to.
Baudrate
The communication speed
the display
module is set to. (Default
19,200)
Figure 9: uProject Settings
NOTES
• uProject and other alphanumeric software may also be downloaded from Matrix Orbital’s support site at http://www.matrixorbital.ca/software/software_alpha/
Matrix Orbital
LCD0821
5
2
Hardware Information
Refer to the following diagram for this chapter:
1 GPO
2 Power / Data Connector
3 Manual Override
4 RS-232 Header
5 Protocol Select Jumpers
Figure 10: LCD0821
2.1
Power/Data Connector
The Power/Data Connector provides a standard connector for powering the display module. The LCD0821
requires five volts for the standard display module and between nine and fifteen for the wide voltage (V)
model. The voltage is applied through pins one and four of the four pin Power/Data connector. Pins two
and three are reserved for serial transmission, using either the RS-232/TTL or the I2 C protocol, depending
on what has been selected by the Protocol Select Jumpers. Pins two and three may be reversed by changing
the Legacy Connector Jumpers in order to be compatible with previous PCB revisions.
Pin 1
PWR (See table 1 on the next
page)
Pin 2
Pin 3
Pin 4
Rx \ SCL (I2 C clock)
Tx \ SDA (I2 C data)
GND
Figure 11: Power Connector and Pin out
Matrix Orbital
LCD0821
6
Table 1: Power Requirements
Standard
-V
Supply Voltage
+5Vdc ±0.25V +9V to +15V
Backlight On Supply
105 mA typical
Backlight Off Supply
30 mA
WARNINGS
• Do not apply any power with reversed polarization.
• Do not apply any voltage other than the specified voltage.
2.2
RS-232 Header
The RS-232 Header provides an alternate serial transmission connector.
Pin 1
Pin 2
Pin 3
GND
Rx
PWR (See table 1)
Figure 12: Power Connector and Pin out
NOTE This header is for RS-232 transmission only.
2.3
Manual Override
The Manual Override is provided to allow the LCD0821 to be reset to factory defaults. This can be
particularly helpful if the display module has been set to an unknown baud rate or I2 C Slave Address and
you are no longer able to communicate with it. If you wish to return the module to its default settings you
must:
1.
2.
3.
4.
5.
Power off the display module.
Place a Jumper on the Manual Override pins.
Power up the display module.
The display module is now set to its default values listed below in table 2.
Edit and save settings.
Matrix Orbital
LCD0821
7
Figure 13: Manual Override Jumper
Table 2: Default Values
Brightness
255
Baud Rate
19.2 kbps
I2 C Slave Address
0x50
Data Lock
False
RS232AutoTransmitData
True
NOTE The display module will revert back to the old settings once turned off, unless the
settings are saved.
2.4
General Purpose Output
A unique feature of the LCD0821 is the ability to control relays and other external devices using a
General Purpose Output, which can provide up to 20 mA of current and +5Vdc from the positive side of
the GPO. This is limited by a 240 ohm resistor as pictured below in figure 14. If the device, which is being
driven by a GPO, requires a relatively high current (such as a relay) and has an internal resistance of its own
greater than 250 ohms, then the 240 ohm resistor may be removed and replaced with a Jumper.
Matrix Orbital
LCD0821
8
+
GND
MAX: 20 mA, +5Vdc
Figure 14: General Purpose Output
WARNING If connecting a relay, be sure that it is fully clamped using
a diode and capacitor in order to absorb any electro-motive force (EMF)
which will be generated.
2.5
Protocol Select Jumpers
The Protocol Select Jumpers, pictured below in figure 15, provide the means necessary to toggle the
display module between RS-232, TTL, and I2 C protocols. As a default, the jumpers are set to RS-232 mode
with solder jumps on the 232 jumpers. In order to place the display module in I2 C mode you must first
remove the solder jumps from the 232 jumpers and then place them on the I2C jumpers. The display will
now be in I2 C mode and have a default slave address of 0x50 unless it has been changed. Similarly, in order
to change the display to TTL mode, simply remove the zero ohm resistors from the 232 or I2 C jumpers and
solder them to the TTL jumpers.
Matrix Orbital
LCD0821
9
Figure 15: Protocol Select Jumpers
3
Troubleshooting
3.1
The display does not turn on when power is applied.
• First, you will want to make sure that you are using the correct power connector. Standard floppy
drive power cables from your PC power supply may fit on the Power/Data Connector however they do
not have the correct pin out as can be seen in figure 8 on page 4. Matrix Orbital supplies power cable
adapters for connecting to a PC, which can be found in the Accessories Section on page 2.
• The next step is to check the power cable which you are using for continuity. If you don’t have an
ohm meter, try using a different power cable, if this does not help try using a different power supply.
• The last step will be to check the Power / Data Connector on the LCD0821. If the Power / Data
Connector has become loose, or you are unable to resolve the issue, please contact Matrix Orbital,
see 12.5 on page 47 for contact information.
3.2
The display module is not communicating.
• First, check the communication cable for continuity. If you don’t have an ohm meter, try using a
different communication cable. If you are using a PC try using a different Com Port.
• Second, please ensure that the display module is set to communicate on the protocol that you are
using, by checking the Protocol Select Jumpers. To change the protocol used by the display module
see Section 2.5 on the preceding page.
• Third, ensure that the host system and display module are both communicating on the same baud rate.
The default baud rate for the display module is 19200 bps.
Matrix Orbital
LCD0821
10
• If you are communicating to the display via I2 C please ensure that the data is being sent to the correct
address. The default slave address for the display module is 0x50.
NOTE I2 C communication will always require pull up resistors.
• Finally, you may reset the display to it’s default settings using the Manual Override Jumper, see
Section 2.3 on page 7.
3.3
The display module is communicating, however text cannot
be displayed.
• A common cause may be that the contrast settings have been set to low. The solution to this problem
is to adjust the contrast settings. The default setting that will work in most environments is 128.
NOTE Optimal contrast settings may vary according to factors such as temperature, viewing angle and lighting conditions.
If you are unable to resolve any issue please contact Matrix Orbital. See 12.5 on page 47
for contact information.
4
Communications
4.1
Introduction
The commands listed in this chapter describe how to configure data flow on the LCD0821.
4.1.1 I2 C Communication Summary
The LCD0821 is capable of communicating at 100 KHz in I2 C mode, with 127 units addressable on a
single I2 C communication line. However, in order to communicate via I2 C you must first ensure that pull up
resistors, with a nominal value of 1K to 10K, are placed on the SCL and SDA communication lines coming
from pins two and three of the Data / Power Connector respectively. Data responses by the module are
automatically output via RS232, in case the host will be querying the module, it is necessary for the host
to inform the module that its responses are to be output via I2 C. This can be done by sending command
254 /160 / 0 to turn off auto transmission of data in RS232. This will keep the data in the buffer until the
master clocks a read of the slave. The I2 C data lines operate at 5V normally or 3.3V for -1U style units. The
LCD0821 uses 8-bit addressing, with the 8th or Least Significant Bit (LSB) bit designated as the read/write
bit, a 0 designates a write address and a 1 designates a read address. The default read address of the display
module will be 0x51, whereas the write address is 0x50 by default. This address may be changed by using
cmd 254 / 51 / . The LCD0821 should only be sent addresses that are even (LSB is 0). When the
I2 C master wishes to write to the display, the effective address is $50 (0101 0000) , since the LSB has to be
Matrix Orbital
LCD0821
11
0 for an I2 C master write. When the I2 C master wishes to read the LCD0821, the effective address is $51
(0101 0001), since the LSB has to be 1 for an I2 C master read.
If we take a standard Phillips 7 bit address of $45 (100 0101), Matrix Orbital’s LCD0821 would describe
this Phillips I2 C address as $8A (1000 1010). The read address would be $8B (1000 1011).
The unit does not respond to general call address ($00).
When communicating in I2 C the LCD0821 will send an ACK on the 9th clock cycle when addressed.
When writing to the display module, the display will respond with a ACK when the write has successfully
been completed. However if the buffer has been filled, or the module is too busy processing data it will
respond with a NAK. When performing a multiple byte read within one I2 C transaction, each byte read from
the slave should be followed by an ACK to indicate that the master still needs data, and a NAK to indicate
that the transmission is over.
The LCD0821 has some speed limitations, especially when run in I2 C mode. Here are some considerations when writing I2 C code:
* to be able to read the replies of query commands (eg. cmds 54, 55) the following command must be
sent (only needs to be sent once, so this can be done somewhere in init): 254 / 160 / 0 this command puts
the reply data in the I2 C output buffer instead of the RS232 output buffer. Please note that due to a 16 byte
output buffer, query commands that reply with more than 16 bytes cannot be read (eg cmd Get FileSystem
Directory)
* 3ms delay between the read commands
* 625us delay in between data bytes within a transaction is necessary
* 375us between transactions is necessary
NOTE These delays are consrevative, and may be decreased based on performance
4.1.2 I2 C Transaction Example
The typical I2 C transaction contains four parts: the start sequence, addressing, information, and stop
sequence. To begin a transaction the data line, SDA, must toggle from high to low while the clock line, SCL,
is high. Next, the display must be addressed using a one byte hexadecimal value, the default to write to the
unit is 0x50, while read is 0x51. Then information can be sent to the unit; even when reading, a command
must first be sent to let the unit know what type of information it is required to return. After each bit is sent,
the display will issue an ACK or NACK as described above. Finally, when communication is complete, the
transaction is ended by toggling the data line from low to high while the clock line is high. An example of
the use of this algorithm to write a simple “HELLO” message can be seen in 3.
Table 3: I2 C Transaction Algorithm
START
Toggle SDA high to low
Address
0x50
Information 0x48 0x45 0x4C 0x4C 0x4F
STOP
Toggle SDA low to high
Matrix Orbital
LCD0821
12
4.1.3 Serial Communication
In addition to being able to communicate via I2 C the LCD0821 communicates natively through the
RS-232 protocol at at a default baud rate of 19,200 bps and is capable of standard baud rates from 9600
to 115,200 bps. Furthermore the LCD0821 is also capable of reproducing any non-standard baud rate in
between using values entered into our baud rate generation algorithm and set through command 164 (0xA4).
The display module communicates at standard voltage levels of -30V to +30V or at TTL levels of 0 to +5V
by setting the Protocol Select Jumpers to TTL.
4.2
Changing the I2 C Slave Address
Syntax
Parameters
Description
Hexadecimal
Decimal
ASCII
Parameter
adr
0xFE 0x33 [adr]
254 51 [adr]
254 “3” [adr]
Length
Description
1
The new I2 C write address (0x00 0xFF).
This command sets the I2 C write address of the module between 0x00
and 0xFF. The I2 C write address must be an even number and the read
address is automatically set to one higher. For example if the I2 C write
address is set to 0x50, then the read address is 0x51.
NOTE The change in address is immediate.
Remembered
Default
4.3
Always
0x50
Changing the Baud Rate
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
ASCII
Parameter
speed
0xFE 0x39 [speed]
254 57 [speed]
254 “9” [speed]
Length
Description
1
Hex value corresponding to a baud
rate.
LCD0821
13
Description
This command sets the RS-232 port to the specified [speed]. The change
takes place immediately. [speed] is a single byte specifying the desired
port speed. Valid speeds are shown in the table below. The display
module can be manually reset to 19,200 baud in the event of an error
during transmission, including transmitting a value not listed below, by
setting the manual override jumper during power up. However, it should
be noted that this command will be ignored until the manual override
jumper is removed again.
Hex Value
53
29
CF
67
33
22
19
10
8
Baud Rate
1200
2400
4800
9600
19200
28800
38400
57600
115200
NOTE This command is not available in I2 C mode.
Remembered
Default
4.4
Always
19,200 bps
Setting a Non-Standard Baud Rate
Syntax
Parameters
Description
Remembered
Matrix Orbital
Hexadecimal
Decimal
Parameter
speed
0xFE 0xA4 [speed]
254 164 [speed]
Length
Description
2
Inputed LSB MSB from baud rate
formula (12-2047).
This command sets the RS-232 port to a non-standard baud rate. The
command accepts a two byte parameter that goes directly into the
CrystalSpeed
modules baud generator. Use the formula, speed = 8×DesiredBaud
− 1 to
calculate the [speed] for any baud rate setting. The speed can be
anywhere from 12 to 2047 which corresponds to a baud range of 977 to
153,800 baud. Setting the baud rate out of this range could cause the
display to stop working properly and require the Manual Override
jumper to be set.
Always
LCD0821
14
Examples
Crystal Speed 16 Mhz
Desired BAUD 13,500
speed =
crystalspeed
−1
8 ∗ DesiredBaud
speed = 148.15 − 1
speed =
16, 000, 000
−1
8 ∗ 13, 500
speed = 147.15
• LSB = 0x93 (rounded)
• MSB = 0x00
• Intended Baud Rate: 13,500 baud
Actual Baud Rate:
16,000,000
=13,514
Percent
Difference:
0.1%
8(147+1)
NOTES
• Results from the formula are rounded down to the nearest whole number (i.e 73.07
= 73).
• This formula becomes less acurate as baud rates increase, due to rounding.
• Place the speed result backwards into the formula to receive the actual baud rate.
(Baud = CrystalSpeed
8(speed+1) )
• The actual baud rate must be within 3% of the intended baud rate for the device to
communicate.
NOTES
• This command is not available in I2 C mode.
5
5.1
Text
Introduction
The LCD0821 is an intelligent display module, designed to reduce the amount of code necessary to begin
displaying data. This means that it is able to display all ASCII formated characters and strings that are sent
to it, which are defined in the current character set. The display module will begin displaying text at the top
left corner of the display area, known as home, and continue to print to the display as if it was a page on a
typewriter. When the text reaches the bottom right row, it is able to automatically scroll all of the lines up
and continue to display text, with the auto scroll option set to on.
Matrix Orbital
LCD0821
15
5.1.1 Character Set
Figure 16: European Character Set
Matrix Orbital
LCD0821
16
Figure 17: Japanese Character Set
NOTE The default font set for these units is Japanese, save for the -WB color option.
Please consult the PCN pages at www.matrixorbital.ca or a sales representative to confirm
font set availability.
5.1.2 Control Characters
In addition to a full text set, the LCD0821 display supports the following ASCII Control characters:
0x08 Backspace
0x0C Clear screen / New page
0x0D Carriage return
0x0A Line feed / New line
Matrix Orbital
LCD0821
17
5.2
Auto Scroll On
Syntax
Description
Remembered
Default
5.3
Description
Remembered
Hexadecimal 0xFE 0x52
Decimal
254 82
ASCII
254 “R”
When auto scrolling is disabled the text will wrap to the top left corner
of the display area when the text reaches the end of last row.
Yes
Clear Screen
Description
Hexadecimal 0xFE 0x58
Decimal
254 88
ASCII
254 “X”
This command will immediately clear all of the contents of the display.
Remembered
No
Syntax
5.5
Yes
On
Auto Scroll Off
Syntax
5.4
Hexadecimal 0xFE 0x51
Decimal
254 81
ASCII
254 “Q”
When auto scrolling is on, it causes the display to shift the entire
display’s contents up to make room for a new line of text when the text
reaches the end of the last row.
Changing the Startup Screen
Syntax
Description
Matrix Orbital
Hexadecimal 0xFE 0x40
Decimal
254 64
ASCII
254 “@”
In order to change the text that is displayed by the LCD0821 when it
starts up simply send the command bytes 254 64 followed by the
characters that you wish to display, starting from the top left. This
command will automatically line wrap the characters that are sent to it.
LCD0821
18
Remembered
5.6
Yes
Set Auto Line Wrap On
Syntax
Description
Hexadecimal 0xFE 0x43
Decimal
254 67
ASCII
254 “C”
Enabling Auto Line Wrap will allow the cursor to automatically wrap
over to the next line when the current line is full.
NOTE Line wraps may occur in the middle of a word.
Remembered
5.7
Set Auto Line Wrap Off
Syntax
Description
Remembered
5.8
Yes
Hexadecimal 0xFE 0x44
Decimal
254 68
ASCII
254 “D”
Disabling Auto Line Wrap will allow you to change the line
configuration. The normally sequentional progression becomes an
alternating pattern. Rather than moving from line 1 to 2 to 3, the display
will write from line 1 to 3 to 2. For a two line display, this means that a
row’s worth of characters written between the first and second lines or
after the second will not be displayed on the screen or wrapped. The
four line models will see only an alteration in line flow.
Yes
Set Cursor Position
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
ASCII
Parameter
col
row
0xFE 0x47 [col] [row]
254 71 [col] [row]
254 “G” [col] [row]
Length
Description
1
Column
1
Row
LCD0821
19
Description
This command will allow you to manually set the cursor position, which
controls the text insertion point, by specifying the [col] and [row] of the
new proposed cursor position.
NOTE If the cursor position is set past the end of a line it will wrap to the beginning of
the next line.
Remembered
5.9
No
Go Home
Syntax
Description
Remembered
Hexadecimal 0xFE 0x48
Decimal
254 72
ASCII
254 “H”
This command will return the cursor to the top left corner of the display
area, identified as row one, column one.
No
5.10 Move Cursor Back
Syntax
Description
Remembered
Hexadecimal 0xFE 0x4C
Decimal
254 76
ASCII
254 “L”
This command will move the cursor back one space. If this command is
sent when the cursor is at the home position the cursor will wrap to the
last row / column position if line wrap is on. Sending this command will
not effect the text displayed on the module, however any characters that
are sent will over write the current characters that are being displayed.
No
5.11 Move Cursor Forward
Syntax
Matrix Orbital
Hexadecimal
Decimal
ASCII
0xFE 0x4D
254 77
254 “M”
LCD0821
20
Description
This command will move the cursor forward one space. If this
command is sent when the cursor is at the bottom right position the
cursor will wrap back to the home position if line wrap is on. Sending
this command will not effect the text displayed on the module, however
any characters that are sent will over write the current characters that are
being displayed.
Remembered
No
5.12 Underline Cursor On
Syntax
Description
Remembered
Hexadecimal 0xFE 0x4A
Decimal
254 74
ASCII
254 “J”
This command will cause the LCD0821 to display an underline cursor
at the current text insertion point.
Yes
5.13 Underline Cursor Off
Description
Hexadecimal 0xFE 0x4B
Decimal
254 75
ASCII
254 “K”
This command will turn the the underline cursor off.
Remembered
Yes
Syntax
5.14 Blinking Block Cursor On
Syntax
Description
Remembered
Hexadecimal 0xFE 0x53
Decimal
254 83
ASCII
254 “S”
This command will cause the LCD0821 to display a block cursor at the
current text insertion point.
Yes
5.15 Blinking Block Cursor Off
Matrix Orbital
LCD0821
21
Description
Hexadecimal 0xFE 0x54
Decimal
254 84
ASCII
254 “T”
This command will turn the block cursor off.
Remembered
Yes
Syntax
6
6.1
Special Characters
Introduction
The LCD0821 has the ability to create four different sets of eight custom characters and save them to
internal banks of memory. Each set of eight can be recalled from memory at any time, and selected characters
can be written to the display screen. Characters and sets can be created at any time, saved for later use, and
displayed to the screen through the intuitive command structure described below.
6.2
Creating a Custom Character
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
ASCII
Parameter
refID
data
0xFE 0x4E [refID] [data]
254 78 [refID] [data]
254 “N” [refID] [data]
Length
Description
1
Character reference ID (0-7).
8
Character data.
LCD0821
22
Description
The LCD0821 allows for upta to eight custom defined characters to be
added onto the the character set. A custom character is a five by eight
pixel matrix with each row represented by a byte value. For example:
1
1
1
1
1
1
1
1
Remembered
6.3
Custom Character ’h’
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
Decimal
16
16
16
16
22
25
17
17
Hex
0x10
0x10
0x10
0x10
0x16
0x19
0x11
0x11
Each bit value of one, in the table, represents an on pixel, whereas a value
of zero represents a pixel that is turned off. Therefore in order to define
custom character ’h’ you would send the command byte prefix 254 followed by the command 78. Next, you will have to select the memory
location in which you wish to save the character in. The available memory locations for this command are zero through to seven. After sending
the memory location, or [refID], you may then send the eight byte custom
character data in sequence from the top to the bottom.
Once you have defined a custom character you may display it by sending
the display module the [refID]. For example if a custom character was
saved in position one, the command to display the custom character, at
the current cursor position, would be simply to send the number one to
the display module without quotes.
No
Saving Custom Characters
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
Parameter
Bank
ID
Data
0xFE 0xC1 [Bank] [ID] [Data]
254 193 [Bank] [ID] [Data]
Length
Description
1
Memory bank to save to (0-4).
1
Character ID (0-7)
8
Character Definition
LCD0821
23
Description
New to the LCD0821 has added five non-volatile memory banks for
custom character storage. This is intended to allow you to create your
own custom bar graphs, medium/large numbers and startup screen.
However, each memory bank may be used to store a set of any eight
custom characters; with the only provision being that memory bank zero
contains the characters that will be used in the startup screen. By default
the memory banks will be loaded as follows:
[Bank]
0
1
2
3
Remembered
6.4
In order to save new custom characters into a memory bank, follow the
same process as you would for creating a custom character, see Section 6.2 on page 22, only use 254 193 [Bank Number] before sending the
[ID] and character [Data].
Yes
Loading Custom Characters
Syntax
Parameters
Description
Remembered
6.5
Description
Startup screen characters.
Horizontal bars
Vertical bars
Medium numbers
Hexadecimal 0xFE 0xC0 [Bank]
Decimal
254 192 [Bank]
Parameter
Length
Description
Bank
1
Memory bank to save to (0-4).
This command is used to load the custom characters into the volatile
memory so that they may be used. If custom bar graph or number
characters are stored in the memory banks, this command may be used
instead of initializing the bar graph / number. To use this command send
the command bytes followed by the [Bank] that contains the custom
character data that you want to retrieve.
No
Save Startup Screen Custom Characters
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
Parameter
refID
data
0xFE 0xC2 [refID] [data]
254 194 [refID] [data]
Length
Description
1
Character reference ID (0-7).
8
Character data.
LCD0821
24
Description
Using this command you may create the custom characters. that will be
stored in memory bank zero, which will be used in the startup screen.
For more information about creating custom characters see Section 6.2
on page 22.
NOTES
• Changes only take place once the power has been cycled.
• This command is the same as sending CMD 254 / 193 / 0 / [ID] / [DATA]
Remembered
6.6
Initialize Medium Number
Syntax
Description
Remembered
6.7
Yes
Hexadecimal 0xFE 0x6D
Decimal
254 109
ASCII
254 “m”
This command will load the default medium number characters into the
volatile memory. If you have stored your own custom medium numbers,
use the ’Load Custom Characters’ command to load your custom
character data into the volatile memory. This command will allow you
to use the ’Place Medium Numbers’ command.
No
Place Medium Numbers
Syntax
Parameters
Description
Hexadecimal 0xFE 0x6F [Row] [Col] [Digit]
Decimal
254 111 [Row] [Col] [Digit]
ASCII
254 “o” [Row] [Col] [Digit]
Parameter
Length
Description
Row
1
The row number.
Col
1
The column number.
Digit
1
Medium number to place (0-9).
This command will place a medium number (two columns high) at the
[row] and [col] specified.
NOTE Medium Numbers must be initialized before this command is executed.
Remembered
Matrix Orbital
No
LCD0821
25
6.8
Initialize Horizontal Bar
Syntax
Description
Remembered
6.9
Hexadecimal 0xFE 0x68
Decimal
254 104
ASCII
254 “h”
This command will load the default horizontal bar characters into the
volatile memory. If you have stored your own custom horizontal bar
data, use the ’Load Custom Characters’ command instead to load your
custom bar data into the volatile memory. This command will allow you
to use the ’Place Horizontal Bar’ command.
No
Place Horizontal Bar Graph
Syntax
Parameters
Description
Hexadecimal
Decimal
ASCII
Parameter
Col
Row
Dir
0xFE 0x7C [Col] [Row] [Dir] [Length]
254 124 [Col] [Row] [Dir] [Length]
254 “|” [Col] [Row] [Dir] [Length]
Length
Description
1
The column number.
1
The row number.
1
The direction of the bar data (0 or
1).
Length
1
The length of the bar data.
This command will place a bar graph at [row], [column]. A [Dir] value
of zero will cause the bar to go right, and one will cause the bar to go
left. The [Length] is the size in pixels of the bar graph.
NOTES
• Horizontal Bars must be initialized before this command is executed.
• Bar graphs may be one directional only.
Remembered
No
6.10 Initialize Narrow Vertical Bar
Syntax
Matrix Orbital
Hexadecimal
Decimal
ASCII
0xFE 0x73
254 115
254 “s”
LCD0821
26
Description
This command will load the narrow vertical bar characters into the
volatile memory. If you have stored your own custom vertical bar data,
use the ’Load Custom Characters’ command instead to load your
custom bar data into the volatile memory. This command will allow you
to use the ’Place Vertical Bar’ command.
NOTE Narrow bars have a width of two pixels.
Remembered
No
6.11 Initialize Wide Vertical Bar
Syntax
Description
Hexadecimal 0xFE 0x76
Decimal
254 118
ASCII
254 “v”
This command will load the wide vertical bar characters into the volatile
memory. If you have stored your own custom vertical bar data, use the
’Load Custom Characters’ command instead to load your custom bar
data into the volatile memory. This command will allow you to use the
’Place Vertical Bar’ command.
NOTE Wide bars have a width of five pixels.
Remembered
No
6.12 Place Vertical Bar
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
ASCII
Parameter
Column
Length
0xFE 0x3D [Column] [Length]
254 61 [Column] [Length]
254 “=” [Column] [Length]
Length
Description
1
The column number.
1
The length of the bar data.
LCD0821
27
Description
This command will place a bar graph at the specified [Column] with the
specified [Length]. The [Length] is the size in pixels of the bar graph.
NOTES
• A Vertical Bar style must be initialized before this command is executed.
• Bar graphs may be one directional only.
Remembered
7
7.1
No
General Purpose Output
Introduction
General purpose outputs allow you to connect devices, such as LEDs, to the LCD0821 and supply them
with up to 20mA of current at 5V. The LCD0821 has 3 GPOs which are software controlled, with functions
to turn them on/off and set the power state for the next startup.
7.2
General Purpose Output Off
Syntax
Parameters
Description
Hexadecimal 0xFE 0x56 [Num]
Decimal
254 86 [Num]
ASCII
254 “V” [Num]
Parameter
Length
Description
Num
1
GPO number.
This command turns OFF general purpose output [num].
NOTE OFF means that the output is pulled HIGH.
Remembered
7.3
Yes
General Purpose Output On
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
ASCII
Parameter
Num
0xFE 0x57 [Num]
254 87 [Num]
254 “W” [Num]
Length
Description
1
GPO number.
LCD0821
28
Description
This command turns ON general purpose output [num]. The standard
GPO’s on the LCD0821 output 20mA of current at 5V.
NOTE ON means the output is pulled LOW.
Remembered
7.4
Yes
Set Startup GPO state
Syntax
Parameters
Description
Hexadecimal 0xFE 0xC3 [Num] [state]
Decimal
254 195 [Num] [state]
Parameter
Length
Description
Num
1
GPO number.
state
1
Startup state (0: Off, 1: On)
This command will set the startup state for the GPO on the next power
up. A value of one will cause the GPO to be off on the next startup
while a value of one will cause the GPO to be on.
NOTE This command does not affect the current state of the GPO.
Remembered
8
8.1
Always
Display Functions
Introduction
The LCD0821 employs software controlled display settings, which allow for control over, clearing the
screen, changing the brightness and contrast or setting timers for turning it on or off. The combination of
these allow you complete software control over your display’s appearance.
8.2
Display On
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
ASCII
Parameter
min
0xFE 0x42 [min]
254 66 [min]
254 “B” [min]
Length
Description
1
Minutes before turning the display
on (0 to 90).
LCD0821
29
8.3
Description
This command turns the backlight on after the [minutes] timer has
expired, with a ninety minute maximum timer. A time of 0 specifies that
the backlight should turn on immediately and stay on. When this
command is sent while the remember function is on, the timer will reset
and begin after power up.
Remembered
Default
Yes
0
Display Off
Syntax
Description
Remembered
8.4
Yes
Set Brightness
Syntax
Parameters
Description
Remembered
Default
8.5
Hexadecimal 0xFE 0x46
Decimal
254 70
ASCII
254 “F”
This command turns the backlight off immediately. The backlight will
remain off until a ’Display On’ command has been received.
Hexadecimal
Decimal
Parameter
brightness
0xFE 0x99 [brightness]
254 153 [brightness]
Length
Description
1
Display brightness setting (0 to
255).
This command sets the display [brightness]. If the remember function is
on, this command acts the same as ’Set and Save Brightness’.
Yes
255
Set and Save Brightness
Description
Hexadecimal 0xFE 0x98 [brightness]
Decimal
254 152 [brightness]
Parameter
Length
Description
brightness
1
Backlight setting (0 to 255).
This command sets and saves the display [brightness] as default.
Remembered
Always
Syntax
Parameters
Matrix Orbital
LCD0821
30
8.6
Set Contrast
Syntax
Parameters
Description
Hexadecimal 0xFE 0x50 [contrast]
Decimal
254 80 [contrast]
ASCII
254 “P” [contrast]
Parameter
Length
Description
contrast
1
Contrast value (0 to 255).
This command sets the display’s contrast to [contrast], where [contrast]
is a value between 0x00 and 0xFF (between 0 to 255). Lower values
cause ‘on’ elements in the display area to appear lighter, while higher
values cause ‘on’ elements to appear darker. Lighting and temperature
conditions will affect the actual value used for optimal viewing.
Individual display modules will also differ slightly from each other in
appearance. In addition, values for optimal viewing while the display
backlight is on may differ from values used when backlight is off.
This command does not save the [contrast] value, and is lost after power
down; but this command has the option of remembering the settings
when issued with the Remember function ‘on’ . When this is the case,
this command is the same as the Set and Save Contrast command.
NOTE This command has only 32 levels for X-Board based displays, meaning eight
contrast settings will have the same single effect. Efectively, values 0 through 7, 8 through
15, and so on will result in the same setting.
Remembered
Default
8.7
Yes
128
Set and Save Contrast
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
Parameter
contrast
0xFE 0x91 [contrast]
254 145 [contrast]
Length
Description
1
Contrast value (0 to 255).
LCD0821
31
Description
This command sets the display’s contrast to [contrast], where [contrast]
is a value between 0x00 and 0xFF (between 0 to 255). Lower values
cause ‘on’ elements in the display area to appear lighter, while higher
values cause ‘on’ elements to appear darker. Lighting conditions will
affect the actual value used for optimal viewing. Individual display
modules will also differ slightly from each other in appearance. In
addition, values for optimal viewing while the display backlight is on
may differ from values used when backlight is off.
NOTE This command saves the [contrast] value so that it is not lost after power down.
Remembered
Default
9
9.1
Yes
128
Data Security
Introduction
Ensuring that your LCD0821 display’s exactly what you want it to can be the difference between a
projects success and failure. This is why we incorporate features such as Data Lock into the LCD0821 With
this new feature you now are in control over of how and when settings will be changed so there is no need
to worry about the module acting exactly like you expected it to because all the settings may be locked and
remembered for the next power up.
9.2
Set Remember
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
Parameter
switch
0xFE 0x93 [switch]
254 147 [switch]
Length
Description
1
0: Do not remember, 1: Remember
LCD0821
32
Description
This command allows you to switch the remember function on and off.
To use the remember function, set remember to on, then set all of the
settings that you wish to save, settings that are listed as ’Remember:
Yes’ support being saved into the non-volatile memory. After you have
set all of the commands that you wish to save, you may then cycle the
power and check the display settings to ensure that all the settings have
been saved. If you wish to use remember again after cycling the power,
you must set it to on again.
NOTES
• Writing to non-volatile memory is time consuming and slows down the operation of
the display.
• Non-volatile memory has a ‘write limit’ and may only be changed approximately
100,000 times.
Remembered
Default
9.3
No
Do not remember
Data Lock
Syntax
Parameters
Matrix Orbital
Hexadecimal
Decimal
Parameter
level
0xFE 0xCA 0xF5 0xA0 [level]
254 202 245 160 [level]
Length
Description
1
Sets the data lock level
LCD0821
33
Description
Paranoia allows you to lock the module from displaying information, as
well as enables the protection of the filesystem and module settings.
Each bit corresponds corresponds to a different lock level, while
sending a zero will unlock your display as the following tables explains:
Bit
0-2
3
Data Lock Level
Reserved
Communication
Speed Lock
4
Setting Lock
5
6
Reserved
Command Lock
7
Display Lock
Description
Should be left 0
When this bit is set (1) the
Baud Rate and I2 C Slave
address are locked
When this bit is set (1)
the display settings such
as backlight, contrast and
GPO settings are locked.
(Internal EEPROM)
Should be left 0
When this bit is set (1) all
commands but commands
202/203 are locked. (cmd
lock)
When this bit is set (1) the
module is locked from displaying any new information. (text lock)
NOTES
• Sending a new data lock level will override the previous data lock level.
• Data lock levels may be combined.
Remembered
Default
Examples
Always
0
Hex
0x00
0x50
9.4
Dec
0
80
Binary
0
01010000
Description
Unlock
Setting and Command Lock
Set and Save Data Lock
Syntax
Matrix Orbital
Hexadecimal
Decimal
0xFE 0xCB 0xF5 0xA0 [level]
254 203 245 160 [level]
LCD0821
34
Parameters
Description
Remembered
Default
9.5
Parameters
Description
Remembered
Hexadecimal 0xFE 0x34 [data]
Decimal
254 52 [data]
ASCII
254 “4” [data]
Parameter
Length
Description
data
16
Writes the customer data
Writes the customer Data. 16 Bytes of data can be saved in non-volatile
memory.
No
Read Customer Data
Description
Hexadecimal 0xFE 0x35
Decimal
254 53
ASCII
254 “5”
Reads whatever was written by Write Customer Data.
Remembered
No
Syntax
10
Always
0
Write Customer Data
Syntax
9.6
Parameter
Length
Description
level
1
Sets the data lock level
This command will set and save the data lock level. See the Data Lock
section for more information.
Miscellaneous
10.1 Introduction
This chapter covers the ’Report Version Number’ and ’Read Module Type’ commands. These commands
can be particularly useful to find out more information about the display module before contacting technical
support.
10.2 Read Version Number
Matrix Orbital
LCD0821
35
Syntax
Description
Hexadecimal 0xFE 0x36
Decimal
254 54
ASCII
254 “6”
This command will return a byte representing the version of the module,
see the following table as an example:
Hex Value
0x19
0x57
Remembered
Version Number
Version 1.9
Version 5.7
No
10.3 Read Module Type
Syntax
Matrix Orbital
Hexadecimal
Decimal
ASCII
0xFE 0x37
254 55
254 “7”
LCD0821
36
Description
Remembered
Matrix Orbital
This command will return a hex value corresponding to the the model
number of the module see the following table:
Hex
1
5
7
9
B
D
F
13
15
21
23
25
27
29
2B
31
33
35
37
39
3B
3D
3F
41
43
45
47
49
4B
4D
4F
51
53
55
57
5B
71
73
77
79
No
Product ID
LCD0821
LCD2041
LCD4041
LK204-25
VFD2021
VFD4021
VK204-25
GLC24064
GLK24064-25
Unused
Unused
GLK24064-16-1U-USB
GLK19264-7T-1U-USB
GLK12232-16-SM
LK204-7T-1U
LK404-AT
LK402-12
LK204-25PC
VK202-24-USB
VK204-24-USB
VK162-12
PK202-25
MOS-AL-202A
MOS-AP-202A
MOS-AL-082
MOS-AV-204
MOS-AV-402
VK402-12
LK402-25
PK204-25
MOS
XBoard-S
MOU
LK202-25-USB
LK204-25-USB
LK162-12-TC
Unused
LK404-25
Unused
GLT480282
LCD0821
Hex
2
6
8
A
C
E
10
14
16
22
24
26
28
2A
2C
32
34
36
38
3A
3C
3E
40
42
44
46
48
4A
4C
4E
50
52
54
56
58
5C
72
74
78
7A
Product ID
LCD2021
LCD4021
LK202-25
LK404-55
VFD2041
VK202-25
GLC12232
Unused
Unused
GLK12232-25
GLK12232-25-SM
GLK24064-16-1U
GLK12232-16
GLK19264-7T-1U
LK204-7T-1U-USB
MOS-AV-162A
LK162-12
LK202-24-USB
LK204-24-USB
PK162-12
MOS-AP-162A
MOS-AL-162A
MOS-AV-202A
PK202-24-USB
MOS-AL-204
MOS-AL-402
LK082-12
VK404-55
VK402-25
Unused
MOI
XBoard-I
XBoard-U
VK202-25-USB
VK204-25-USB
Unused
GLK240128-25
VK404-25
GLT320240
GLT240128
37
11
Command Summary
11.1 Communications
Description
Changing the I2 C Slave
Address
Changing the Baud Rate
Setting a Non-Standard
Baud Rate
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
0xFE 0x33 [adr]
254 51 [adr]
254 “3” [adr]
0xFE 0x39 [speed]
254 57 [speed]
254 “9” [speed]
0xFE 0xA4 [speed]
254 164 [speed]
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
0xFE 0x51
254 81
254 “Q”
0xFE 0x52
254 82
254 “R”
0xFE 0x58
254 88
254 “X”
0xFE 0x40
254 64
254 “@”
0xFE 0x43
254 67
254 “C”
0xFE 0x44
254 68
254 “D”
0xFE 0x47 [col] [row]
254 71 [col] [row]
254 “G” [col] [row]
0xFE 0x48
254 72
254 “H”
Page
13
13
14
11.2 Text
Description
Auto Scroll On
Auto Scroll Off
Clear Screen
Changing the Startup
Screen
Set Auto Line Wrap On
Set Auto Line Wrap Off
Set Cursor Position
Go Home
Matrix Orbital
LCD0821
Page
18
18
18
18
19
19
19
20
38
Description
Move Cursor Back
Move Cursor Forward
Underline Cursor On
Underline Cursor Off
Blinking Block Cursor
On
Blinking Block Cursor
Off
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
0xFE 0x4C
254 76
254 “L”
0xFE 0x4D
254 77
254 “M”
0xFE 0x4A
254 74
254 “J”
0xFE 0x4B
254 75
254 “K”
0xFE 0x53
254 83
254 “S”
0xFE 0x54
254 84
254 “T”
Page
20
20
21
21
21
21
11.3 Special Characters
Description
Creating a Custom
Character
Saving Custom
Characters
Loading Custom
Characters
Save Startup Screen
Custom Characters
Initialize Medium
Number
Place Medium Numbers
Initialize Horizontal Bar
Place Horizontal Bar
Graph
Matrix Orbital
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
Hexadecimal
Decimal
Hexadecimal
Decimal
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
0xFE 0x4E [refID] [data]
254 78 [refID] [data]
254 “N” [refID] [data]
0xFE 0xC1 [Bank] [ID] [Data]
254 193 [Bank] [ID] [Data]
0xFE 0xC0 [Bank]
254 192 [Bank]
0xFE 0xC2 [refID] [data]
254 194 [refID] [data]
0xFE 0x6D
254 109
254 “m”
0xFE 0x6F [Row] [Col] [Digit]
254 111 [Row] [Col] [Digit]
254 “o” [Row] [Col] [Digit]
0xFE 0x68
254 104
254 “h”
0xFE 0x7C [Col] [Row] [Dir] [Length]
254 124 [Col] [Row] [Dir] [Length]
254 “|” [Col] [Row] [Dir] [Length]
LCD0821
Page
22
23
24
24
25
25
26
26
39
Description
Initialize Narrow Vertical
Bar
Initialize Wide Vertical
Bar
Place Vertical Bar
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
0xFE 0x73
254 115
254 “s”
0xFE 0x76
254 118
254 “v”
0xFE 0x3D [Column] [Length]
254 61 [Column] [Length]
254 “=” [Column] [Length]
Page
26
27
27
11.4 General Purpose Output
Description
General Purpose Output
Off
General Purpose Output
On
Set Startup GPO state
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
0xFE 0x56 [Num]
254 86 [Num]
254 “V” [Num]
0xFE 0x57 [Num]
254 87 [Num]
254 “W” [Num]
0xFE 0xC3 [Num] [state]
254 195 [Num] [state]
Page
28
28
29
11.5 Display Functions
Description
Display On
Display Off
Set Brightness
Set and Save Brightness
Set Contrast
Set and Save Contrast
Matrix Orbital
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
Hexadecimal
Decimal
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
0xFE 0x42 [min]
254 66 [min]
254 “B” [min]
0xFE 0x46
254 70
254 “F”
0xFE 0x99 [brightness]
254 153 [brightness]
0xFE 0x98 [brightness]
254 152 [brightness]
0xFE 0x50 [contrast]
254 80 [contrast]
254 “P” [contrast]
0xFE 0x91 [contrast]
254 145 [contrast]
LCD0821
Page
29
30
30
30
31
31
40
11.6 Data Security
Description
Set Remember
Data Lock
Set and Save Data Lock
Write Customer Data
Read Customer Data
Syntax
Hexadecimal
Decimal
Hexadecimal
Decimal
Hexadecimal
Decimal
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
0xFE 0x93 [switch]
254 147 [switch]
0xFE 0xCA 0xF5 0xA0 [level]
254 202 245 160 [level]
0xFE 0xCB 0xF5 0xA0 [level]
254 203 245 160 [level]
0xFE 0x34 [data]
254 52 [data]
254 “4” [data]
0xFE 0x35
254 53
254 “5”
Syntax
Hexadecimal
Decimal
ASCII
Hexadecimal
Decimal
ASCII
0xFE 0x36
254 54
254 “6”
0xFE 0x37
254 55
254 “7”
Page
32
33
34
35
35
11.7 Miscellaneous
Description
Read Version Number
Read Module Type
Page
35
36
11.8 Command By Number
Command
Hex
0x33
0x34
0x35
0x36
0x37
0x39
0x3D
0x40
0x42
0x43
0x44
0x46
Matrix Orbital
Description Page
Dec
ASCII
51
“3”
52
“4”
53
“5”
54
“6”
55
“7”
57
“9”
61
“=”
64
“@”
66
“B”
67
“C”
68
“D”
70
“F”
Changing the I2 C Slave Address
Write Customer Data
Read Customer Data
Read Version Number
Read Module Type
Changing the Baud Rate
Place Vertical Bar
Changing the Startup Screen
Display On
Set Auto Line Wrap On
Set Auto Line Wrap Off
Display Off
LCD0821
13
35
35
35
36
13
27
18
29
19
19
30
41
Command
Hex
0x47
0x48
0x4A
0x4B
0x4C
0x4D
0x4E
0x50
0x51
0x52
0x53
0x54
0x56
0x57
0x58
0x68
0x6D
0x6F
0x73
0x76
0x7C
0x91
0x93
0x98
0x99
0xA4
0xC0
0xC1
0xC2
Description Page
Dec
ASCII
71
“G”
72
“H”
74
“J”
75
“K”
76
“L”
77
“M”
78
“N”
80
“P”
81
“Q”
82
“R”
83
“S”
84
“T”
86
“V”
87
“W”
88
“X”
104
“h”
109
“m”
111
“o”
115
“s”
118
“v”
124
“|”
145
147
152
153
164
192
193
194
0xC3
195
Matrix Orbital
Set Cursor Position
Go Home
Underline Cursor On
Underline Cursor Off
Move Cursor Back
Move Cursor Forward
Creating a Custom Character
Set Contrast
Auto Scroll On
Auto Scroll Off
Blinking Block Cursor On
Blinking Block Cursor Off
General Purpose Output Off
General Purpose Output On
Clear Screen
Initialize Horizontal Bar
Initialize Medium Number
Place Medium Numbers
Initialize Narrow Vertical Bar
Initialize Wide Vertical Bar
Place Horizontal Bar Graph
Set and Save Contrast
Set Remember
Set and Save Brightness
Set Brightness
Setting a Non-Standard Baud Rate
Loading Custom Characters
Saving Custom Characters
Save Startup Screen Custom
Characters
Set Startup GPO state
LCD0821
19
20
21
21
20
20
22
31
18
18
21
21
28
28
18
26
25
25
26
27
26
31
32
30
30
14
24
23
24
29
42
12
Appendix
12.1 Specifications
12.1.1
Environmental
Table 56: Environmental Specifications
Standard Temperature Extended Temperature
Operating Temperature
0◦ C to +50◦ C
-20◦ C to +70◦ C
◦
◦
Storage Temperature
-20 C to +70 C
-30◦ C to +80◦ C
Operating Relative Humidity 90% max non-condensing
Vibration (Operating)
4.9 m/s2 XYZ directions
Vibration (Non-Operating)
19.6 m/s2 XYZ directions
Shock (Operating)
29.4 m/s2 XYZ directions
Shock (Non-Operating)
490 m/s2 XYZ directions
12.1.2
Electrical
Table 57: Electrical Specifications
Standard
Wide Voltage (V)
Supply Voltage
+5Vdc ±0.25V
+9V to +15V
Minimum Current
45mA typical
Backlight On (YG & IY)
add 65mA (110mA) typical
Backlight On (R)
add 60mA (105mA) typical
Backlight On (GW & WB)
add 20mA (65mA) typical
12.1.3
Optical
Table 58: Optical Specifications
Character x Lines
8 columns x 2 rows
Module Size
58.00mm x 32.00mm x 26.80mm
Character Size
2.96mm x 5.56mm
Display Size
27.80mm x 11.49mm
LED Backlight Half-Life (YG & IY)
50, 000 hours typical
LED Backlight Half-Life (R)
20, 000 hours typical
LED Backlight Half-Life (GW & WB)
10, 000 hours typical
Matrix Orbital
LCD0821
43
NOTE To prolong life, it is recommended that the backlight be turned off when the
display is not in use.
12.2 Physical Layout
Matrix Orbital
LCD0821
44
Figure 18: Physical Diagram
Matrix Orbital
LCD0821
45
12.3 Ordering Information
LCD
1
08
2
2
3
1
4
-R
5
-V
6
-E
7
Table 59: Part Numbering Scheme
#
1
2
3
4
Description
Screen Type
Width
Height
GPO
5
Color (Text/Background)
6
Input Voltage
7
Temperature
Options
LCD: Liquid Crystal Display
08: Eight Character Columns
2: Two Character Rows
1: Single GPO
NP: Standard Grey/Yellow-Green
GW: Grey/White
WB: White/Blue
R: Red/Black
IY: Yellow/Black
NP: Standard (4.75-5.25V)
-V: Extended Volatge (9.00-15.0V)
NP: Standard (0◦ C to +50◦C)
-E: Extended Temperature (-20◦ C to +70◦ C)
Table 60: Part Options
12.4 Definitions
E Extended Temperature (-20C to 70C)
V Wide Voltage (+9 to +15Vdc)
GW Grey Text / White Background
WB White Text / Blue Background
R Inverse Red
IY Inverse Yellow
MSB Most Significant Byte
LSB Least Significant Byte
Matrix Orbital
LCD0821
46
12.5 Contacting Matrix Orbital
Telephone
Sales: 1(403)229-2737
Support: 1(403)204-3750
On The Web
Sales: http://www.MatrixOrbital.com
Support: http://www.MatrixOrbital.ca
Forums: http://www.lcdforums.com
12.6 Revision History
Revision
2.0
2.1
Matrix Orbital
Table 61: Revision History
Description
Author
Initial Manual
Matrix Orbital
Updated Backlight Life
Clark
LCD0821
47