Matrix Orbital LCD0821 User manual

LCD0821 rev 2 2
Table of Contents
1. Introduction.............................................................................................................................. 4
1.1 What it Does..................................................................................................................................... 4
1.2 What it Does Not Do ........................................................................................................................ 4
1.3 Setup for Testing .............................................................................................................................. 4
1.4 Trying Out your LCD0821 ............................................................................................................... 5
2. Connections and Configuration............................................................................................. 7
2.1 Connector Pinout .............................................................................................................................. 7
2.1.1 Power and I2C Connections .................................................................................................... 7
2.1.2 RS-232 Communications........................................................................................................ 9
2.1.3 Applying Power via the RS-232 Connector.......................................................................... 10
2.1.4 Configuring RS-232 and I2C................................................................................................. 10
2.1.5 I2C Communications............................................................................................................. 11
2.2 General Purpose Output.................................................................................................................. 12
3. Displaying Text ...................................................................................................................... 14
3.1 General ........................................................................................................................................... 14
3.2 The Built-In Character Font............................................................................................................ 14
3.3 Writing Text to the Display ............................................................................................................ 15
3.4 Text Commands.............................................................................................................................. 15
4. Bar Graphs and Special Characters .................................................................................... 17
4.1 Command List ................................................................................................................................ 17
5. Miscellaneous Commands ................................................................................................... 20
5.1 Command List ................................................................................................................................ 20
6. Appendix: Command Summary ........................................................................................... 22
6.1 General ........................................................................................................................................... 22
6.2 Issuing Commands.......................................................................................................................... 22
6.3 On Numbers.................................................................................................................................... 22
6.3.1 ASCII Characters.................................................................................................................. 23
6.4 Text Commands.............................................................................................................................. 23
6.5 Bar Graphs and Special Characters ................................................................................................ 24
6.6 Miscellaneous Commands .............................................................................................................. 25
7. Appendix: Specifications and Options................................................................................ 26
7.1 Specifications.................................................................................................................................. 26
7.2 Options ........................................................................................................................................... 27
8. Appendix: Glossary............................................................................................................... 28
Revisions
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 4
1. Introduction
Your LCD0821 has the following features:
8 column by 2 line text display
Built-in font with provision for up to 8 user-defined characters
Speeds from 1200 bps to a lighting fast 19.2 Kbps over RS-232
Communicate over RS-232 or I²C
Use up to 16 modules on the same 2-wire I2C interface
Software controlled contrast
Backlight with configurable time-out setting up to 180 minutes
One general purpose output for a variety of applications
Horizontal or Vertical bar graphs
Variable power options, +5V or +7V to +15V
Extended temperature option.
1.1 What it Does
The LCD0821 is designed as the display unit for an associated controller. The controller may be anything
from a single board, special purpose microcontroller to a PC, depending on the application. This controller
is responsible for what you see on the screen of the LCD0821.
The LCD0821 provides a simple command structure to allow text and bar graphs to be displayed on the
screen. Text fonts are built in, and use standard ASCII mapping. Provision is made for up to 8 user-defined
characters.
The screen is backlit for low-light situations. Backlighting may be turned on or off under program control.
Contrast is adjustable to compensate for differing lighting conditions and viewing angles.
A general purpose output allows the controller to switch an electronic or electro-mechanical device by
issuing commands to the display unit. This can be used for controlling LEDs, relays, etc.
1.2 What it Does Not Do
The LCD0821 does not include bitmap graphics capability, except that permitted by defining special
characters. The LCD0821 does not include a keypad interface.
1.3 Setup for Testing
Before setting up your application you may want to try out the LCD0821. This is easily done with a PC.
Here's what you'll need:
A power cable with a 4 pin connector (same connector as used to connect a 3.5 inch floppy
drive). Do not connect the LCD0821 to an unmodified spare power connector in a PC. To
modify such a cable see section 2.1.1.
A 5 V power supply (for wide voltage models an 8 – 15 V supply is required).
a PC with a spare RS-232 port (COM1 or COM2).
A modified 9 or 25 pin RS-232 serial cable.
Figure 1-1 Connections for Testing
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 5
1. Refer to the diagram above and Figure 2-1 for the following steps.
2. Wire the connector to the power supply. On most connectors the RED lead will go to +5V and the
BLACK lead to GND. See Section 2.1.1 for details. Note: The manufacturer's warranty is void if the
unit is subjected to over-voltage or reversed polarity.
3. Connect the LCD0821 to the PC using the serial cable and adapter if required. Make sure the RS-232
cable includes the required ground lead. There must be no voltage differential between the RS-
232 ground and the power supply ground.
4. Connect the power connector, making sure that the +5V goes to V+ as shown in Figure 2-2. Turn on the
power: the LCD backlight should come on and you should see a blinking cursor at the top left.
Now you're ready to try it out.
1.4 Trying Out your LCD0821
The unit is connected to power and the PC and the backlight is on. You're ready to make sure it's working
properly. To experiment with typing text, run a PC terminal program, such as Hyperterm. Make sure it's
configured to use the correct port. Set the baud rate to 19,200.
If you type characters on the keyboard, they should now appear on the LCD0821 screen. (It is normal for
text to wrap from line 1 to line 3, then to line 2 then 4. See section 3.4.1). A few common ASCII control
characters work as follows:
Character Hex value Function
LF 0x0A Moves cursor to the beginning of the next (or previous) line.
FF 0x0C Clears the display and puts the cursor at the top left
BS 0x08 Moves the cursor one position to the left and clears that position.
Note: These command characters are not guaranteed to work on other Matrix Orbital display
modules. If you want your code to be portable, use the appropriate commands listed later in the
manual instead.
If you want to exercise some of the other features of the LCD0821 you'll need to write a program (in any
convenient language such as Basic or C) to issue the required command strings. Most terminal programs are
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 6
unable to issue the 0xFE character needed as a command prefix. You probably won't need to do this at the
initial testing stage.
If you've reached this point and operation is normal, you can be confident that your LCD0821 works
properly.
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 7
2. Connections and Configuration
2.1 Connector Pinout
Refer to the diagram below for this chapter.
Figure 2-1 Electrical Connections
The LCD0821 has four connectors:
Connector Function
2 pin header General purpose output (see section 0)
4 pin Power and I2C communications (see section 2.1.1)
3 pin header RS-232/power (see section 2.1.3)
Jumpers Sets RS232 speed and I2C address
2.1.1 Power and I2C Connections
Power is applied via pins +5V OR Vin as shown in Figure 2-1. Power requirement for standard units is +5
VDC ±0.25V (units with the wide voltage range option require 8 – 15 VDC). Power may also be supplied
via the RS-232 connector as described in section 2.1.3.
Warning:
Do not apply any power with reversed polarization.
Do not apply any voltage other than the specified voltage.
Do not use any cables other than the cables supplied by Matrix Orbital,
unless you are aware of the modifications required.
Do not apply more than one type of power connector at one time
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 8
Connector pinout is as follows:
1 2 3 4
Figure 2-2 Power connector
Pin 1 +5.0 VDC (+8 to +15 VDC with wide voltage option)
Pin 2 SCL (I2C clock)
Pin 3 SDA (I2C data)
Pin 4 Ground
2.1.1.1 Five Volt Modules
If the LCD0821 is used in a PC it is tempting to plug a spare power connector into the unit. Don't do this!
Wiring for the PC power connector and that required for the LCD0821 are different as shown in Figure 2-3
below.
PC wiring
Display module w irin
g
+5 V
+5 V
GND
GND
+12 V
Figure 2-3 Power Connector wiring differences
If you don't want to modify cable wiring yourself, Matrix Orbital can supply an adapter cable designed to
use with the LCD0821 when it's installed in a PC. The cable is wired as shown in Figure 2-4 below. Note
that this cable does not provide connections for I2C.
Figure 2-4 Five volt Power Cable
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 9
2.1.1.2 Wide Voltage Range Modules
Note: Do not use this cable unless your display module has the "wide voltage range" option (option V). Use
of the 12 volt power cable with 5 volt modules will damage the module.
The 12 volt power cable is designed for use with wide voltage range display modules mounted in a PC.
Wiring required for the 12 volt power connector is shown in Figure 2-5 below.
PC wiring
Display module w irin
g
+5 V
+12 V
GND
GND
+12 V
Figure 2-5 Wiring for 12 volt modules
If you don't want to modify cable wiring yourself, Matrix Orbital can supply an adapter cable designed to
use with the display module when it's installed in a PC. The cable is wired as shown in Figure 2-6 below.
Figure 2-6 Twelve volt power cable
2.1.2 RS-232 Communications
2.1.2.1 Connections
A 3 pin strip header is provided for RS-232 communications. Power may also be supplied via this connector
if desired. See Figure 2-7 for pin connections.
Figure 2-7 RS-232 and power connector
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 10
The RS-232 connector on the PC cable is wired so that a standard “straight through” serial cable may be
used to connect the module to a standard serial port such as COM ports on PCs. Note that this device
complies with the EIA232 standard in that it uses signal levels from ± 3V to ± 12V. It will not operate
correctly at TTL (0 to +5V) levels.
Pin Number
on LCD
Pin Number
on Host
Direction Description
1 N/A - +5Vdc
2 3 to LCD module Data In
3 5 - Ground
2.1.3 Applying Power via the RS-232 Connector
The power connector on the PC cable is wired as shown in Figure 2-7. Power may be provided to the
module by pin 1 of the 3pin strip header connector instead of through the 4-pin SIP. If power is to be
applied using the 3 pin strip header.
2.1.4 TTL Communications
The LCD0821 does not communicate with TTL by default, the following modification must be made:
Solder the jumper in the picture below:
Figure 2-8 TTL modification
2.1.5 Configuring RS-232 and I2C
RS-232 baud rate and I2C address are configured by means of jumpers.
Figure 2-9 RS-232 jumpers
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 11
The module is supplied with jumpers J1 and J2 installed, which gives a RS-232 baud rate of 19200 and an
I2C address of 0x5C.
RS-232 port: J0, J1, J2 - control baud rate. RS-232 format is 8N1 (8 bits, no parity, one stop bit)
I²C port: J0, J1, J2, J3 - sets slave peripheral address
Baud Rate Slave Address J3 J2 J1 J0
50H out out out out
1200
52H out out out in
54H out out in out
2400
56H out out in in
58H out in out out
9600
5AH out in out in
5CH out in in out
19200
5EH out in in in
60H in out out out
1200
62H in out out in
64H in out in out
2400
66H in out in in
68H in in out out
9600
6AH in in out in
6CH in in in out
19200
6EH in in in in
2.1.6 I2C Communications
I²C communications runs at 100 kBps and supports up to 16 units on a single communications line. The
I2C data line operates on 5 volt CMOS levels.
The idea of ACK is to indicate when the data has been received correctly. ACK does not indicate data
incorrectly received. ACK simply fails to indicate when data is correctly received. Clearly, this is of limited
usefulness and even less so with Matrix Orbital modules. Matrix orbital modules are not capable of failing
to acknowledge an incorrectly received byte in response to that bytes transition. They are only capable of
failing to acknowledge the bytes following the byte, which was not received. To fully understand the
reasons for this one needs to understand something about how a Matrix Orbital module processes data.
Basically the reason why a Matrix Orbital module might fail to receive a byte correctly is that it was unable
to process the byte previous before the failed byte was transmitted. Because the module cannot possibly
know that it would be unable to store the byte before the next byte was received it cannot know to not ACK.
The reason for this situation in deference to situations you might be familiar with (i.e. memory chips, etc…)
is that the Matrix Orbital module employs a microprocessor to perform these data storage functions. A
memory chip takes care of these things entirely with in hardware subsystems that operate at the same speed
as the transmission themselves.
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 12
The LCD0821 uses a standard Phillips 7bit address as defined by Phillips. How ever, we at Matrix Orbital
specify I2C address in 8bits. The 8th bit, least significant bit (LSB or Low Order Bit) of the 8bit address is
read/write bit. If we take a standard Phillips 7bit address of 45hex this would be in binary 1000101. This is
7bits. If one adds the read write bit to this 7bit address and you assume that you are writing one gets
10001010. Matrix Orbital would describe the Philips I2C address of 45hex as 8Ahex. The read address
would be 8Bhex.
For more information on Phillips I2C please visit…
http://www.ping.be/~ping0751/i2cfaq/i2cindex.htm
2.2 General Purpose Output
The LCD0821 has a general purpose output which can be used to control relays or other electronic devices.
This allows external devices to be turned on or off using your PC or controller and software commands.
(See sections 5.1.5 and 5.1.6 for the command syntax.)
The output is wired as shown in Figure 2-. The + terminal is connected to the module positive supply, the –
terminal is connected through a 240 ohm current limiting resistor and the electronic switch to ground.
+ 5 V DC
240 ohm current limiting resistor
load
+
-
Figure 2-10 General Purpose Outputs
Maximum allowable current is 20 mA, which is enforced by the current limiting resistor. If the device being
switched has a resistance of 240 ohms or more the corresponding resistor may be shorted. Solder a small
jumper wire (wirewrap wire is good) between the two feedthrough holes as shown in Figure 2-11.
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 13
GPO
+-
240 ohm
resistor
Jumper
Figure 2-11 Bypassing 240 ohm resistor
Note: The GPOs do not have any over current or over/under voltage protection so care must be taken when
using them. For instance if the external device is a relay it must be fully clamped (using a diode and
capacitor – see Figure 2-) to absorb any generated back electro-motive force (EMF).
10 - 10 0 u F
1N400 1
Re lay
coil
GPO
+-
Figure 2-12 Clamping a Relay
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 14
3. Displaying Text
This chapter describes the various text-display commands in detail. A quick reference summary of all text
commands is found in section 6.4.
3.1 General
Text is displayed on the LCD0821 using the built-in 5 x 7 dot matrix font (plus up to 8 user-defined
characters.
3.2 The Built-In Character Font
The LCD0821 includes a built-in 5 x 7 dot matrix font with the full range of ASCII characters plus a variety
of extended characters, as shown in Figure 3-1.
Figure 3-1 Character Set
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 15
In addition to the built-in characters, users may define up to 8 special characters (which, once defined,
occupy positions 0x00 to 0x07 in the above chart). The LCD0821 does not have provision to download
other fonts.
3.3 Writing Text to the Display
When the display receives a character, it displays that character at the position currently defined. The next
character sent to the module then advances to the following position on the display. Characters are drawn
using the built-in font, and only characters defined in the font are actually displayed. Characters that are not
defined by the built-in font print as a space (i.e. the cursor is advanced for the next character).
The position where text is to be inserted is a character location stored in the LCD0821's volatile memory
and maintained internally by the LCD0821's firmware. This position is manipulated by the commands
shown in the following section.
3.4 Text Commands
In this section commands are identified by their names and decimal values. Hex and ASCII equivalents are
given in the summary (Table 6-1). Before issuing commands to the LCD0821 please read sections 6.2
and 6.3.
3.4.1 Auto line wrap on (254 67)
Enables automatic line wrapping. Note that this is not "word wrapping" and wraps may occur in the middle
of a word. Note that if auto line wrap and auto scroll are both off (default) text will wrap from line 1 to line
3 then 2 then 4. Default is OFF.
3.4.2 Auto line wrap off (254 68)
Disables automatic line wrapping.
3.4.3 Auto scroll on (254 81)
When auto scrolling is on, it causes the LCD0821 to shift the entire display’s contents up to make room for
a new line of text when the text reaches the scroll position (the bottom right character position). Default is
OFF.
3.4.4 Auto scroll off (254 82)
When auto scrolling is disabled, text will wrap to the top left corner of the display area instead of scrolling.
Existing text in the display area is not erased before new text is placed. A series of "spaces" followed by a
Cursor Home command may be used to erase the top line of text.
3.4.5 Set cursor position (254 71 [column] [row])
This command sets the cursor position (text insertion point) to the [column] and [row] specified. Columns
have values from 1 to 20 (0x01 to 0x14) and rows have values of 1 to 4 (0x01 to 0x04).
3.4.6 Send cursor home (254 72)
This command moves the cursor position (text insertion point) to the top left of the display area.
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 16
3.4.7 Turn on underline cursor (254 74)
Turns on the underline cursor. The cursor shows the current text insertion point. Both underline and
blinking cursors may be turned on or off independently. The underline cursor is OFF by default.
3.4.8 Turn off underline cursor (254 75)
Turns off the underline cursor. Does not affect the blinking block cursor.
3.4.9 Turn on block (blinking) cursor (254 83)
Turns on the blinking block cursor. The cursor shows the current text insertion point. Both blinking and
underline cursors may be turned on or off independently. The block cursor is ON by default.
3.4.10 Turn off block (blinking) cursor (254 84)
Turns off the blinking block cursor. Does not affect the underline cursor.
3.4.11 Cursor left (254 76)
Moves the cursor one position to the left but does not erase any character that may be in that position. Note
that this command moves the text insertion point even if the cursor is turned off.
Note: A "destructive backspace", which erases the character to the left of the original position, may be done
by issuing the following sequence: cursor left, space, cursor left.
3.4.12 Cursor right (254 77)
Moves the cursor one position to the right but does not erase any character that may be in that position.
Note that this command moves the text insertion point even if the cursor is turned off.
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 17
4. Bar Graphs and Special Characters
The LCD0821 includes the ability to draw bar graphs (either horizontal or vertical), large numbers, and
allows users to define up to eight special characters. Before issuing commands to the LCD0821 please
read sections 6.2 and 6.3.
Eight characters (ASCII values 0x00 to 0x07) are set aside for use with bar graphs, user defined characters,
and large digits. Since the same 8 characters are used for each function, the functions may not be used
simultaneously. The characters may be defined or redefined at any time by issuing the commands shown in
this section. Once defined, they may be used either by means of the bar graph commands, or by simply
issuing one of the ASCII values 0x00 to 0x07 (which is not prefixed by the command byte, 254).
4.1 Command List
4.1.1 Initialize wide vertical bar graph (254 118)
This command defines the 8 special/user characters to be blocks suitable for use in drawing wide (5 pixel)
vertical bar graphs. Any previously existing definitions will be lost. Once this command has been issued,
any number of vertical bar graphs may be drawn unless the characters are redefined by another command.
4.1.2 Initialize narrow vertical bar graph (254 115)
This command defines the 8 special/user characters to be blocks suitable for use in drawing narrow (2 pixel)
vertical bar graphs. Any previously existing definitions will be lost. Once this command has been issued,
any number of vertical bar graphs may be drawn unless the characters are redefined by another command.
4.1.3 Draw vertical bar graph (254 61 [column] [height])
Draws a vertical bar graph in [column] having a height of [height] pixels. The height may range from 0 to
32 (0x00 to 0x20) pixels. The necessary characters must first be initialized by either of the commands
shown in section 4.1.1 or 4.1.2, which will determine the width of the graph drawn. Graph may be erased by
drawing a bar graph of height = 0 in the same column.
4.1.4 Initialize horizontal bar graph (254 104)
This command defines the 8 special/user characters to be blocks suitable for use in drawing horizontal bar
graphs. Any previously existing definitions will be lost. Once this command has been issued, any number of
horizontal bar graphs may be drawn unless the characters are redefined by another command.
4.1.5 Draw horizontal bar graph (254 124 [column] [row] [dir] [length])
Draws a horizontal bar graph in [row] starting at [column] with a length of [length] pixels. [row] may have a
value of 0x01 to 0x04, column may range from 0x01 to 0x14 (0 to 20) and length may be from 0x00 to
0x64 (0 to 100) if the graph can extend the full width of the screen. Each column is 5 pixels wide (spaces
between the columns don't count).
[dir] specifies the direction: 0x00 goes from left to right, 0x01 goes from right to left.
4.1.6 Define custom character (254 78 [c] [8 bytes])
The LCD0821 allows up to 8 user defined (custom) characters. These characters occupy the first 8 (0x00 to
0x07) places in the character set (see Figure 3-1).
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 18
Custom characters occupy a 5 x 8 pixel matrix. Built-in characters are 5 x 7: the bottom row of pixels is
normally reserved for the underline cursor. The underline cursor should be turned off if the bottom row of
pixels forms part of a custom character.
The characters are defined by issuing the command 254 78 [c] followed by 8 bytes to define the character.
[c] is the character number (0x00 to 0x07). The 8 bytes are mapped as shown below:
MSB LSB
* * * 1 2 3 4 5 Data Byte 1
* * * 6 7 8 9 10 Data Byte 2
* * * 11 12 13 14 15 Data Byte 3
* * * 16 17 18 19 20 Data Byte 4
* * * 21 22 23 24 25 Data Byte 5
* * * 26 27 28 29 30 Data Byte 6
* * * 31 32 33 34 35 Data Byte 7
* * * 36 37 38 39 40 Data Byte 8
A "1" bit indicates an on (black) pixel, a "0" bit indicates an off (clear) pixel.
Once defined, a character is displayed simply by issuing a value (0x00 to 0x07) corresponding to the
character number. The character will be laid out as follows:
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 19
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
26 27 28 29 30
31 32 33 34 35
36 37 38 39 40
Cursor Line
Note: Custom characters will be erased if either the "initialize bar graph" or "initialize large digits"
commands are issued.
Downloaded from Elcodis.com electronic components distributor

LCD0821 rev 2 20
5. Miscellaneous Commands
The commands listed in this chapter don't readily fit in any of the other categories, or are used in more than
one category. Before issuing commands to the LCD0821 please read sections 6.2 and 6.3.
5.1 Command List
5.1.1 Clear display (254 88)
This command clears the display and resets the text insertion point to the top left of the screen.
5.1.2 Set contrast (254 80 [contrast])
This command sets the display's contrast to [contrast], where [contrast] is a value between 0x00 and 0xFF
(between 0 and 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 LCD0821 modules will
also differ slightly from each other in appearance. In addition, values for optimal viewing while the
LCD0821 backlight is on may differ from values used when backlight is off.
5.1.3 Backlight on (254 66 [minutes])
This command turns on the backlight for a time of [minutes] minutes. If [minutes] is zero (0), the backlight
will remain on indefinitely. Note: the factory default for backlight is on.
5.1.4 Backlight off (254 70)
This command turns the backlight of the LCD0821 off.
5.1.5 General purpose output on (254 86)
This command turns ON the General Purpose Output (see section 0 for a description of the GPOON means
that the output is pulled low (ground via 240 ohms).
5.1.6 General purpose output off (254 87)
This command turns ON the General Purpose Output. ). OFF means that the "–" side of the output floats.
Downloaded from Elcodis.com electronic components distributor
Table of contents
Other Matrix Orbital Control Unit manuals
Popular Control Unit manuals by other brands

Bardiani Valvole
Bardiani Valvole BBZK Operating and maintenance instructions

Festo
Festo VZQA-C-M22C Series Repair instructions

Siemens
Siemens Climatix POL822 Instruction

WAGO
WAGO 750-640 manual

Siemens
Siemens LEC1 Series manual

CALEFFI
CALEFFI altecnic 201-2001 Installation, operation & maintenance instructions