PK162-12 Technical Manual Revision: 3.
Contents Contents 1 Getting Started 1.1 Accessories . . . . . . 1.2 Features . . . . . . . . 1.3 Connecting to a PC . . 1.4 Installing the Software 1.4.1 uProject . . . . ii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.10 5.11 5.12 5.13 5.14 5.15 Move Cursor Back . . . . Move Cursor Forward . . . Underline Cursor On . . . Underline Cursor Off . . . Blinking Block Cursor On Blinking Block Cursor Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10 Display Functions 10.1 Introduction . . . . . . . 10.2 Display On . . . . . . . 10.3 Display Off . . . . . . . 10.4 Set Brightness . . . . . . 10.5 Set and Save Brightness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1 Getting Started The PK162-12 is an extremely bright PLED display, that features a 160 degree viewing angle and is 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 PK162-12 can be used with virtually any controller.
1.1 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 14.5 on page 55 for contact information.
Figure 3: Breadboard Cable Figure 4: Serial Cable 4FT Matrix Orbital PK162-12 3
Figure 5: Communication and 5V Power Cable Matrix Orbital PK162-12 4
1.2 Features • 16 column by 2 line PLED display • Selectable communication protocol, RS-232/TTL or I2 C • Seven, 5V -20mA, general purpose outputs for a variety of applications • Lightning fast communication speeds, up to 57.6 kbps for RS-232 and 400 kbps for I2 C • Default 19.
1.3 Connecting to a PC The PK162-12 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 4 on page 3, as well as a modified 5V power adapter such as the one pictured in figure 1 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.
1.4 Installing the Software 1.4.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.
2 Hardware Information Refer to the following diagram for this chapter: 1 DB-9 Connector 2 Power Through DB9 Jumper 3 GPOs 4 Manual Override 5 Power / Data Connector 6 Keypad Interface 7 Protocol Select Jumpers 8 Dallas 1-Wire Bridge Figure 8: PK162-12 2.1 DB-9 Connector The PK162-12 provides a DB-9 Connector to readily interface with serial devices which use the EIA232 standard signal levels of ±12V to ±12V.
2.1.1 Power Through DB-9 Jumper In order to provide power through pin 9 of the DB-9 Connector you must place a solder jumper on the Power through DB-9 Jumper pictured in figure 10 below. The PK162-12 allows all voltage models to use the power through DB-9 option, see table 1 on the following page for display module voltage requirements. Figure 10: Power Through DB-9 Jumper WARNING Do not apply voltage through pin 9 of the DB-9 connector AND through the Power/Data Connector at the same time. 2.
Table 1: Power Requirements Standard Supply Voltage Supply (all pixels off) Supply (all pixels on) Wide Voltage (V) Wide Voltage with Efficient Switching Power Supply (VPT) +9V to +15V +9V to +35V 16 mA 24 mA +5Vdc ±0.25V WARNINGS • Do not apply any power with reversed polarization. • Do not apply any voltage other than the specified voltage. 2.
- GND + MAX: 20 mA, +5Vdc Figure 13: 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 Dallas 1-Wire Bridge In addition to the six general purpose outputs the PK162-12 offers a Dallas 1-wire bridge, to allow for an additional thirty two 1-wire devices to be connected to the display. See Section 8.1 on page 32. Figure 14: Dallas 1-Wire Bridge 2.
2. 3. 4. 5. 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. Figure 15: Manual Override Jumper Table 2: Default Values Brightness Baud Rate I2 C Slave Address Data Lock RS232AutoTransmitData 255 19.2 kbps 0x50 False True NOTE The display module will revert back to the old settings once turned off, unless the settings are saved. 2.
Figure 16: Keypad Interface Connector 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 6 on page 6. Matrix Orbital supplies power cable adapters for connecting to a PC, which can be found in the Accessories Section on page 2.
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.6 on page 11. 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.
4.1.2 Serial Communication In addition to being able to communicate via I2 C the PK162-12 communicates natively through the RS232 protocol at a default baud rate of 19,200 bps and is capable of standard baud rates from 1200 to 57600 bps. Furthmore the PK162-12 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).
Parameters Description Parameter speed Length 1 Description Hex value corrisponding to a baud rate. 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.
Description 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 modCrystalSpeed − 1 to calules baud generator. Use the formula, speed = 8×DesiredBaud culate 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.
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. 5.1.1 Character Set Figure 17: Character Set 5.1.
5.2 Auto Scroll On Syntax Hexadecimal Decimal ASCII 0xFE 0x51 254 81 254 “Q” Description 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. Remembered Yes Factory Default On 5.
5.5 Changing the Startup Screen Syntax Hexadecimal Decimal ASCII Parameters Parameter chars 0xFE 0x40 [chars] 254 64 [chars] 254 “@” [chars] Length 80 Description Characters to display for the startup screen. Description In order to change the text that is displayed by the PK162-12 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.
Description Disabling Auto Line Wrap will allow you to have full control over the cursor position. This means that once the cursor has advanced to the end of a line, it will not wrap over to the next line, unless given the ’Set Cursor Position’ Command. NOTE All characters written to the display past the end of a line will be lost. Remembered Yes 5.
Remembered No 5.10 Move Cursor Back Syntax Hexadecimal Decimal ASCII 0xFE 0x4C 254 76 254 “L” Description 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. Remembered No 5.
Description This command will cause the PK162-12 to display an underline cursor at the current text insertion point. Remembered Yes 5.13 Underline Cursor Off Syntax Hexadecimal Decimal ASCII 0xFE 0x4B 254 75 254 “K” Description This command will turn the the underline cursor off. Remembered Yes 5.
Remembered Yes 6 Special Characters 6.1 Introduction 6.2 Creating a Custom Character Syntax Hexadecimal Decimal ASCII Parameters Parameter refID data Matrix Orbital 0xFE 0x4E [refID] [data] 254 78 [refID] [data] 254 “N” [refID] [data] Length 1 8 PK162-12 Description Character reference ID (0-7). Character data.
Description The PK162-12 allows for up 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.
Description New to the PK162-12 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.
Syntax Hexadecimal Decimal Parameters Parameter refID data Description 0xFE 0xC2 [refID] [data] 254 194 [refID] [data] Length 1 8 Description Character reference ID (0-7). Character data. 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 24. NOTES • Changes only take place once the power has been cycled.
Syntax Hexadecimal Decimal ASCII Parameters Parameter Row Col Digit 0xFE 0x6F [Row] [Col] [Digit] 254 111 [Row] [Col] [Digit] 254 “o” [Row] [Col] [Digit] Length 1 1 1 Description The row number. The column number. Medium number to place (0-9). Description This command will place a medium number (two columns high) at the [row] and [col] specified. Remembered No 6.
Parameters Parameter Col Row Dir Length Description Length 1 1 1 1 Description The column number. The row number. The direction of the bar data (0 or 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. NOTE Bar graphs may be one directional only. Remembered No 6.
Syntax Description Hexadecimal Decimal ASCII 0xFE 0x76 254 118 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.
7 General Purpose Output 7.1 Introduction General purpose outputs allow you to connect devices, such as LEDs, to the PK162-12 and supply them with up to 20mA of current at 5V. The PK162-12 has 7 GPOs which are software controlled, with functions to turn them on/off and set the power state for the next startup. 7.2 gpo_CMD_GPOtoggle() 7.2.1 Meta Short Toggle Keypad/GPO mode Remember Yes 7.2.2 Parameters Mode 1 0: Keypad, 1: GPO 7.2.3 Description The 162-12 uses the same port for keypad and GPO.
Description This command turns OFF general purpose output [num]. NOTE OFF means that the output is ground. Remembered Yes 7.4 General Purpose Output On Syntax Hexadecimal Decimal ASCII Parameters Parameter Num Description 0xFE 0x57 [Num] 254 87 [Num] 254 “W” [Num] Length 1 Description GPO number. This command turns ON general purpose output [num]. The standard GPO’s on the PK162-12 output 20mA of current at 5V. NOTE The output is pulled high. Remembered Yes 7.
Description 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 Always 8 Dallas 1-Wire 8.1 Introduction Another convenient feature of the PK162-12 is that it provides a Dallas 1-wire interface in order to readily communicate with up to thirty two 1-wire devices on a single bus.
Description This command will allow you to begin communicating with the devices on the 1-wire bus by returning a packet containing device information for each 1-wire device on the bus in the form of: Search Return Packet Offset (Bytes) 0 Offset (Bytes) 2 Description 0x232A Preamble 2 1 0x8A Packet is 10 bytes long, another address will follow 0x0A Packet is 10 bytes long, this is the last address 3 4 5 13 1 1 8 1 0x31 - 1-Wire Packet Type Error Code (0x00 for success) 1-Wire Address CRC8 0x00 means
Parameters Parameter flags SndBits 1 RcvBits 1 Data Description Length 1 Description Flags to control optional components of the transaction. The number of bits you will be transmitting on the bus. The number of bits you will be reading on the bus. Data to be transmitted, LSB to MSB. variable This command will perform a single transaction on the 1-wire bus in this order: 1. Bus Reset. 2. Transmit data onto the bus. 3. Receive data from the bus.
9 Keypad 9.1 Introduction The PK162-12 supports up to a 12 key, matrix style, keypad and may be configured to allow key presses to be automatically transmitted via RS-232 or polled through I2 C. The PK162-12 also allows for autorepeating key presses, and remapping of all keypad character codes. 9.2 gpo_CMD_GPOtoggle() 9.2.1 Meta Short Toggle Keypad/GPO mode Remember Yes 9.2.2 Parameters Mode 1 0: Keypad, 1: GPO 9.2.3 Description The 162-12 uses the same port for keypad and GPO.
Factory Default On 9.4 Auto Transmit Key Presses Off Syntax Hexadecimal Decimal ASCII 0xFE 0x4F 254 79 254 “O” Description In this mode, up to 10 key presses are buffered until the unit is polled by the host system, via the poll keypad command 254 38. Issuing this command places the unit in polled mode. Remembered Yes 9.5 Poll Key Press Syntax Hexadecimal Decimal ASCII 0xFE 0x26 254 38 254 “&” Description This command returns any buffered key presses via the RS-232 interface.
Hexadecimal Decimal ASCII Syntax 0xFE 0x45 254 69 254 “E” Description This command clears any unread key presses. In a menu application, if the user presses a key which changes the menu context, any following key presses may be inaccurate and can be cleared out of the buffer between menu changes to prevent jumping around the menu tree. It may also be used, in effect, to reset the keypad in case the host application resets for whatever reason. Remembered No 9.
Syntax Hexadecimal Decimal ASCII Parameters Parameter mode Description 0xFE 0x7E [mode] 254 126 [mode] 254 “~” [mode] Length 1 Description Auto Repeat Mode (0: Resend Key , 1: Key Up/Down) Two auto repeat modes are available and are set via the same command: • Resend Key Mode: 0x00 • Key Up/Down Mode: 0x01 Resend Key Mode This mode is similar to the action of a keyboard on a PC. In this mode, when a key is held down, the key code is transmitted immediately followed by a 1/2 second delay.
Description This command turns auto repeat mode off. See Set Auto Repeat Mode. Remembered No 9.10 Assign Keypad Codes Syntax Hexadecimal Decimal Parameters Parameter KDown KUp 0xFE 0xD5 [KDown] [KUp] 254 213 [KDown] [KUp] Length 25 25 Description Key down codes Key up codes Description This command will allow you to reassign the key codes that correspond to the key presses on the matrix style key pad.
Syntax Hexadecimal Decimal ASCII Parameters Parameter min 0xFE 0x42 [min] 254 66 [min] 254 “B” [min] Length 1 Description Minutes before turning the display on (0 to 100). Description This command turns the display on after the [minutes] timer has expired , with a one-hundred minute maximum timer. A time of 0 specifies that the display 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.
Description This command sets the display [brightness]. If the remember function is on, this command acts the same as ’Set and Save Brightness’. Remembered Yes Factory Default 255 10.5 Set and Save Brightness Syntax Hexadecimal Decimal Parameters Parameter brightness 0xFE 0x98 [brightness] 254 152 [brightness] Length 1 Description Backlight setting (0 to 255). Description This command sets and saves the display [brightness] as default. Remembered Always 11 Data Security 11.
Syntax Hexadecimal Decimal Parameters Parameter switch Description 0xFE 0x93 [switch] 254 147 [switch] Length 1 Description 0: Do not remember, 1: Remember 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.
Description Data lock, originally known as 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 1-4 5 6 7 8 Data Lock Level Unlock Description Sending a zero will cause the display to unlock. (0) Reserved These bits are used as place holders and should not be omitted.
Syntax Hexadecimal Decimal Parameters Parameter level 0xFE 0xCB 0xF5 0xA0 [level] 254 203 245 160 [level] Length 1 Description Sets the data lock level Description This command will set and save the data lock level. See the Data Lock section for more information. Remembered Always Factory Default 0 12 Miscellaneous 12.1 Introduction This chapter covers the ’Report Version Number’ and ’Read Module Type’ commands.
12.
Description Changing the I2 C Slave Address Syntax Hexadecimal Decimal ASCII 0xFE 0x33 [adr] 254 51 [adr] 254 “3” [adr] Changing the Baud Rate Hexadecimal Decimal ASCII 0xFE 0x39 [speed] 254 57 [speed] 254 “9” [speed] 15 Setting a Non-Standard Baud Rate Hexadecimal Decimal 0xFE 0xA4 [speed] 254 164 [speed] 16 Description Auto Scroll On Syntax Hexadecimal Decimal ASCII 0xFE 0x51 254 81 254 “Q” Auto Scroll Off Hexadecimal Decimal ASCII 0xFE 0x52 254 82 254 “R” 19 Clear Screen Hexadecimal De
Description Go Home Syntax Hexadecimal Decimal ASCII 0xFE 0x48 254 72 254 “H” Move Cursor Back Hexadecimal Decimal ASCII 0xFE 0x4C 254 76 254 “L” 22 Move Cursor Forward Hexadecimal Decimal ASCII 0xFE 0x4D 254 77 254 “M” 22 Underline Cursor On Hexadecimal Decimal ASCII 0xFE 0x4A 254 74 254 “J” 22 Underline Cursor Off Hexadecimal Decimal ASCII 0xFE 0x4B 254 75 254 “K” 23 Blinking Block Cursor On Hexadecimal Decimal ASCII 0xFE 0x53 254 83 254 “S” 23 Blinking Block Cursor Off Hexadecimal
Description Save Startup Screen Custom Characters Syntax Hexadecimal Decimal 0xFE 0xC2 [refID] [data] 254 194 [refID] [data] Initialize Medium Number Hexadecimal Decimal ASCII 0xFE 0x6D 254 109 254 “m” 27 Place Medium Numbers Hexadecimal Decimal ASCII 0xFE 0x6F [Row] [Col] [Digit] 254 111 [Row] [Col] [Digit] 254 “o” [Row] [Col] [Digit] 27 Initialize Horizontal Bar Hexadecimal Decimal ASCII 0xFE 0x68 254 104 254 “h” 28 Place Horizontal Bar Graph Hexadecimal Decimal ASCII 0xFE 0x7C [Col] [Row
Syntax Hexadecimal Decimal 0xFE 0xC3 [Num] [state] 254 195 [Num] [state] Description Search for a 1-Wire Device Syntax Hexadecimal Decimal 0xFE 0xC8 0x2 254 200 2 Dallas 1-Wire Transaction Hexadecimal Decimal 0xFE 0xC8 0x1 [flags] [SndBits] [RcvBits] [Data] 33 254 200 1 [flags] [SndBits] [RcvBits] [Data] Description Auto Transmit Key Presses On Syntax Hexadecimal Decimal ASCII 0xFE 0x41 254 65 254 “A” Auto Transmit Key Presses Off Hexadecimal Decimal ASCII 0xFE 0x4F 254 79 254 “O” 35 Poll Key
Description Auto Repeat Mode Off Syntax Hexadecimal Decimal ASCII 0xFE 0x60 254 96 254 “‘” Assign Keypad Codes Hexadecimal Decimal 0xFE 0xD5 [KDown] [KUp] 254 213 [KDown] [KUp] Page 38 39 13.
13.9 Miscellaneous Description Read Version Number Syntax Hexadecimal Decimal ASCII 0xFE 0x36 254 54 254 “6” Read Module Type Hexadecimal Decimal ASCII 0xFE 0x37 254 55 254 “7” Page 44 45 13.
Command Hex 0x57 0x58 0x60 0x68 0x6D 0x6F 0x73 0x76 0x7C 0x7E 0x93 0x98 0x99 0xA4 0xC0 0xC1 0xC2 Dec 87 88 96 104 109 111 115 118 124 126 147 152 153 164 192 193 194 Description 0xC3 0xC8 0xCA 195 200 202 ASCII “W” “X” “‘” “h” “m” “o” “s” “v” “|” “~” General Purpose Output On Clear Screen Auto Repeat Mode Off Initialize Horizontal Bar Initialize Medium Number Place Medium Numbers Initialize Narrow Vertical Bar Initialize Wide Vertical Bar Place Horizontal Bar Graph Set Auto Repeat Mode Set Remember Se
14.1.2 Electrical Table 64: Electrical Specifications Standard Supply Voltage Supply (all pixels off) Supply (all pixels on) Wide Voltage (V) +5Vdc ±0.25V Wide Voltage with Efficient Switching Power Supply (VPT) +9V to +15V +9V to +35V 16 mA 24 mA 14.
14.
14.4 Definitions E Extended Temperature (-20C to 70C) VPT Wide Voltage with Efficient Switching Power Supply (+9 to +35Vdc) 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 14.5 Contacting Matrix Orbital Telephone Sales and Support: 1(403)229-2737 On The Web Sales: http://www.MatrixOrbital.com Support: http://www.MatrixOrbital.ca Forums: http://www.lcdforums.