background image

6.5 Bar Graphs and Special Characters

The commands in this section are used to define and display bar graphs and special characters.

Table 12: Bar Graph and Special Character Commands

Command

Syntax

Notes

Initialize thick vertical bar
graph

FE 76
254 118
254 ’v’

Initializes the user character set to
make wide vertical bar graphs.

Initialize thin vertical bar
graph

FE 73
254 115
254 ’s’

Initializes the user character set to
make narrow vertical bar graphs.

Initialize horizontal bar
graph

FE 68
254 104
254 ’h’

Initializes the user character set to
make horizontal bar graphs.

Draw vertical bar graph

FE 3D [col][length]
254 61 [col][length]
254 ’=’ [col][length]

Draws a vertical bar graph at column
[col] of length [length]. Length is
measured in pixels (0x00 to 0x14).
User must first use the ’v’ or ’s’
command to initialize characters.

FE 7C [c][r][d][length]
254 124 [c][r][d][length]
254 ’|’ [c][r][d][length]

Draws a horizontal bar graph start-
ing at column [c] on row [r] with di-
rection [d] (0 is right, 1 is left) of
length [length]. Length is measured
in pixels (0x00 to 0x64 if starting in
column 1). User must first use the
’h’ command to initialize characters.

FE 6E
254 110
254 ’n’

Initializes the user character set to
make large digits.

7.1 Specifications

FE 23 [col] [digit]
254 23 [col] [digit]
254 ’#’ [col] [digit]

Place large digit number [digit] in
column [col] of the display. Cursor
moves to bottom right of large digit.
[digit] is 0x00 to 0x09, [col] is 0x01
to 0x12 (i.e. 1 to 18 decimal).

FE 4E [c][8 bytes]
254 78 [c][8 bytes]
254 ’N’ [c][8 bytes]

Defines one of 8 custom "user" char-
acters. Character number is [c] be-
tween 0x00 and 0x07.

Matrix Orbital

LCD2041

24

Summary of Contents for LCD2041

Page 1: ...LCD2041 Technical Manual Revision 2 0 ...

Page 2: ...232 and I2C 8 2 3 I2C Communications 10 2 3 1 ACK 10 2 4 General Purpose Output 11 3 Displaying Text 12 3 1 General 13 3 2 The built in Character Font 13 3 3 Writing Text to the Display 14 3 4 Text Commands 14 3 4 1 Auto line wrap on 254 67 14 3 4 2 Auto line wrap off 254 68 14 3 4 3 Auto scroll on 254 81 14 3 4 4 Auto scroll off 254 82 14 3 4 5 Set cursor position 254 71 column row 15 3 4 6 Send ...

Page 3: ... 5 Miscellaneous Commands 19 5 1 Command List 19 5 1 1 Clear display 254 88 19 5 1 2 Set contrast 254 80 contrast 19 5 1 3 Backlight on 254 66 minutes 19 5 1 4 Backlight off 254 70 19 5 1 5 General purpose output off 254 86 19 5 1 6 Set backlight brightness 254 153 brightness 20 5 1 7 General purpose output on 254 87 20 5 1 8 Read module type 20 6 Appendix Command Summary 20 6 1 General 20 6 2 Iss...

Page 4: ...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 Th...

Page 5: ...ng sure that the 5V goes to V Turn on the power the display backlight should come on and a blinking cursor at the top left should appear 1 4 Trying out the LCD2041 The unit should be connected to power and the PC and backlight should be on To experiment with typing text run a PC program such as Display Tuner or AlphaDemo Make sure it s configured to use the correct port Set the baud rate to 19 200...

Page 6: ... for standard units is 5 VDC 0 25V Units with the wide voltage range option require 8 15 VDC WARNINGS 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 aware of the modifications required Do not apply voltage to the DB 9 con nector AND power connector Do not apply...

Page 7: ...ting to plug a spare power connector into the unit Don t do this Wiring for the PC power connector and that required for the display are different Figure 4 Wiring for 5V Modules Matrix Orbital is equipped to supply an adapter cable designed to use with the LCD2041 when it s installed in a PC The cable is wired as shown in the Figure below NOTE This cable does not provide connections for I2C Matrix...

Page 8: ...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 the Figure below Figure 6 Wiring for 12 Volt Modules Matrix Orbital is equipped to 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 the Figure below Figure 7 Twelve Volt Pow...

Page 9: ...25 volts may cause immediate destruction of unit and void the Manufacturer s Warranty 2 2 RS 232 Communications The RS 232 connector on the PC cable is wired so that a standard straight through 9 pin D sub cable may be used to connect the module to a standard serial port such as COM ports on PCs Please note that this device complies with the EIA 232 standard in that it uses signal levels from 12V ...

Page 10: ...Data to LCD Data in LCD Rx Tx 5 Ground gnd gnd 2 2 2 Alternate Serial Connection An optional alternate connection header is provided to allow one cable for data and power Two jumpers will have to be set into the RS 232 position above the DB 9 connector Figure 10 RS232 Configuration Connector pinout is as follows Matrix Orbital LCD2041 7 ...

Page 11: ...c 0V to 5V levels The following three jumps will need to be modified as shown in figure below This will allow TTL communications through the 4 pin SIP header or the DB9 connector Figure 12 TTL Communications 2 2 4 Configuring RS 232 and I2C RS 232 baud rate and I2C address are configured by means of jumpers Matrix Orbital LCD2041 8 ...

Page 12: ...1 J2 J3 sets slave peripheral address Table 4 Serial Baud Rates Baud Rate Slave Address J3 J2 J1 J0 1200 50H out out out out 52H out out out in 2400 54H out out in out 56H out out in in 9600 58H out in out out 5AH out in out in 19200 5CH out in in out 5EH out in in in 1200 60H in out out out 62H in out out in 2400 64H in out in out 66H in out in in 9600 68H in in out out 6AH in in out in 19200 6CH...

Page 13: ...le 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 one might be familiar with i e memory chips etc is that the Matrix Orbital module employs a micro processor 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 th...

Page 14: ...oftware commands The terminal is connected to the module positive supply the terminal is connected through a 240ohm current limiting resistor and the electronic switch to ground Figure 16 General Purpose Output Maximum allowable current is 20mA which is enforced by the current limiting resistor If the device being switched has a resistance of 240ohms or more the corresponding resistor may be short...

Page 15: ...tance if the external device is a relay it must be fully clamped using a diode and capacitor to absorb any generated back electro motive force or EMF Figure 18 Clamping a Relay 3 Displaying Text This chapter describes the various text display commands in detail Before issuing commands to the LCD2041 please read sections 6 2 and 6 3 Matrix Orbital LCD2041 12 ...

Page 16: ...uilt in 5x7 dot matrix font with the full range of ASCII characters plus a variety of extended characters as shown in the Figure below Figure 19 Character Set 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 display does not have provision to download other Matrix Orbital LCD2041 13 ...

Page 17: ...d by their names and decimal values 3 4 1 Auto line wrap on 254 67 Enables automatic line wrapping This is not word wrapping and wraps may occur in the middle of a word If auto line wrap and auto scroll are both off default text will wrap from line 1 to line 3 then 2 then 4 Factory 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...

Page 18: ...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 cursor is off by default 3 4 10 Turn off block blinking cursor 254 84 Turns off the blinking block cursor Does not affect the under...

Page 19: ...cal bar graph 254 118 This command defines the 8 special user characters to be blocks suitable for use in drawing wide vertical bar graphs such as 5 pixels 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 com...

Page 20: ... large digits to be drawn on the display screen Numbers of almost full display height may be placed along side regular text on four row displays The column number has a maximum value which is less than the display width because the digits are all three columns wide Before using this command the Initialize large digits command must be issued to define the blocks necessary to make up the digits If r...

Page 21: ...character will be laid out as follows Table 6 Character Values 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 any of the Initialize bar graph commands are issued Example of a degree symbol txUart sendByte 0xFE command prefix txUart sendByte N custom character command txUart sendByte...

Page 22: ...es 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 5 1 3 Backlight on 254 66 minutes This command turns on the backlight for a time o...

Page 23: ...es at the time of this publication are as follows Table 7 Module Values LCD0821 0x01 LCD2021 0x03 LCD2041 0x05 LCD4041 0x07 LK202 25 0x08 LK204 25 0x09 LK404 55 0x0A VFD2021 0x0B VFD2041 0x0C VK204 25PC 0x0E VK204 25 0x0F GLC12232 0x10 GLC24064 0x13 GLK24064 25 0x15 GLK12232 25 0x22 LK404 AT 0x31 LK402 12 0x33 LK162 12 0x34 6 Appendix Command Summary 6 1 General The operation of the display is con...

Page 24: ...using to deal with directly Hexadecimal hex numbers are particularly convenient because exactly two hexadecimal digits make up one byte each hex digit representing 4 binary digits 4 bits as shown here Table 8 Hex Value Table Binary Hex Decimal Binary Hex Decimal 0000 0 0 1000 8 8 0001 1 1 1001 9 9 0010 2 2 1010 A 10 0011 3 3 1011 B 11 0100 4 4 1100 C 12 0101 5 5 1101 D 13 0110 6 6 1110 E 14 0111 7...

Page 25: ...arameter which is wrong In the tables given in the following sections ASCII characters are shown as A with single quotes 6 4 Text Commands Syntax in the tables below is given in hex decimal and decimal with ASCII in that order one per line Table 10 Text Commands Command Syntax Default Notes Auto line wrap on FE 43 254 67 254 C off Enables line wrapping not word wrap Auto line wrap off FE 44 254 68...

Page 26: ...Underline cursor off FE 4B 254 75 254 K Turns off the un derline cursor Block cursor on FE 53 254 83 254 S off Turns on the blinking block cursor Block cursor off FE 54 254 84 254 T Turns off the blinking block cursor Cursor left FE 4C 254 76 254 L n a Moves the cur sor one position to the left If the cursor is already at the beginning of a line it will move to the end of the other line Cursor rig...

Page 27: ... length length Length is measured in pixels 0x00 to 0x14 User must first use the v or s command to initialize characters FE 7C c r d length 254 124 c r d length 254 c r d length Draws a horizontal bar graph start ing at column c on row r with di rection d 0 is right 1 is left of length length Length is measured in pixels 0x00 to 0x64 if starting in column 1 User must first use the h command to ini...

Page 28: ...en 0 and 255 hex 0 to FF Larger darker Backlight on FE 42 minutes 254 66 minutes 254 B minutes on Backlight will stay on for min utes If minutes 0 backlight will stay on permanently Backlight off FE 46 254 70 254 F on Turns off back light General purpose output off FE 56 gpo 254 86 gpo 254 V gpo off Turns general purpose output OFF General purpose output on FE 57 gpo 254 87 gpo 254 W gpo off Turns...

Page 29: ... Supply Voltage 4 75 5 25 Vdc optional 8 15 VDC Supply Current 11 mA typical Supply Backlight Current 90 mA typical Table 18 Optical Characteristics Number of Characters 80 20 characters by 4 lines Matrix format 5 x 7 with underline Display Area 76 3 x 25 20 mm XxY Character Size 2 95 x 4 75 mm XxY not including underline Character Pitch 3 55 mm Line pitch 5 35 mm Dot Size 0 55 x 0 55 mm XxY Dot P...

Page 30: ...Figure 20 Physical Layout Matrix Orbital LCD2041 27 ...

Page 31: ...se supersets are of ten called extended ASCII character sets Backlight A backlit display is illuminated from behind to provide nighttime and improved daytime readability Baud Rate The data and signaling bit transmission rate of an RS 232 device Binary Number A number written using binary notation which only uses zeros and ones Bit The smallest unit of information a computer can work with Each bit ...

Page 32: ... gins and spacing between characters and lines Hexadecimal Refers to the base 16 number system which consists of 16 unique symbols the numbers 0 to 9 and the let ters A to F For example the decimal number 15 is represented as F in the hexadecimal numbering sys tem The hexadecimal system is useful because it can represent every byte 8 bits as two consecutive hex adecimal digits It is easier for hum...

Page 33: ...l To view consecutive lines of data on the display screen The term scroll means that once the screen is full each new line appears at the bottom edge of the screen and all other lines move up one position Serial Number A number that is one of a series and is used for identi fication of the module Serial Port A port or interface that can be used for serial commu nication in which only 1 bit is tran...

Page 34: ...rbital LCD2041 GW E LCD2041 GW V LCD2041 GW VPT LCD2041 IY E LCD2041 IY V LCD2041 IY VPT LCD2041 R E LCD2041 R V LCD2041 R VPT LCD2041 WB E LCD2041 WB V LCD2041 WB VPT LCD2041 V E LCD2041 WB V E LCD2041 WB VPT E LCD2041 GW V E LCD2041 GW VPT E LCD2041 R V E LCD2041 R VPT E LCD2041 IY VPT E LCD2041 VPT E LCD2041 V ...

Reviews: