Matrix Orbital VK204-24-USB (75-529-79)

Matrix Orbital VK204-24-USB (75-529-79)
VK204-24-USB
Technical Manual
Revision: 1.0
Contents
Contents
ii
1 Introduction
1.1 What to expect from the VK204-24-USB . .
1.2 What not to expect from the VK204-24-USB
1.3 Keypad Interface . . . . . . . . . . . . . . .
1.4 Setup for Testing . . . . . . . . . . . . . . .
1.5 Trying out the VK204-24-USB . . . . . . . .
1.6 Trying out a Keypad . . . . . . . . . . . . .
1.6.1 Here’s what to do: . . . . . . . . . .
.
.
.
.
.
.
.
1
1
1
1
2
2
3
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3
3
5
7
8
9
9
10
10
11
12
12
12
13
14
14
14
14
14
14
15
15
15
15
15
15
15
16
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2 Connections
2.1 Connector Pinout . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Power . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.2 USB Communications . . . . . . . . . . . . . . . . . . .
2.1.3 Alternate USB Communications . . . . . . . . . . . . . .
2.1.4 Serial TTL Communication . . . . . . . . . . . . . . . .
2.1.5 LED Headers . . . . . . . . . . . . . . . . . . . . . . . .
2.2 General Purpose Outputs . . . . . . . . . . . . . . . . . . . . . .
2.2.1 Advanced General Purpose Outputs & GPO’s 1, 2, 3 and 4
2.2.2 Advanced GPO Power Select . . . . . . . . . . . . . . .
2.2.3 General Purpose Outputs 5, 6 and 7 . . . . . . . . . . . .
2.2.4 Dallas 1-Wire Bridge . . . . . . . . . . . . . . . . . . . .
2.3 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 The Built-In Character Font . . . . . . . . . . . . . . . . . . . . .
2.5 Writing Text to the Display . . . . . . . . . . . . . . . . . . . . .
2.6 Text Commands . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.6.1 Auto Line Wrap On (254 67)(R) . . . . . . . . . . . . . .
2.6.2 Auto Line Wrap Off (254 68)(R) . . . . . . . . . . . . . .
2.6.3 Auto Scroll On (254 81)(R) . . . . . . . . . . . . . . . .
2.6.4 Auto Scroll Off (254 82)(R) . . . . . . . . . . . . . . . .
2.6.5 Set Cursor Position (254 71 [column][row]) . . . . . . .
2.6.6 Send Cursor Home (254 72) . . . . . . . . . . . . . . . .
2.6.7 Turn On Underline Cursor (254 74)(R) . . . . . . . . . .
2.6.8 Turn Off Underline Cursor (254 75)(R) . . . . . . . . . .
2.6.9 Turn On Block (blinking) Cursor (254 83)(R) . . . . . . .
2.6.10 Turn Off Block (blinking) Cursor (254 84)(R) . . . . . . .
2.6.11 Cursor Left (254 76) . . . . . . . . . . . . . . . . . . . .
2.6.12 Cursor Right (254 77) . . . . . . . . . . . . . . . . . . .
Matrix Orbital
VK204-24-USB
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ii
3 Keypad Interface
3.1 General . . . . . . . . . . . . . . . . . . . . . . .
3.2 Connections . . . . . . . . . . . . . . . . . . . . .
3.3 Keypad Commands . . . . . . . . . . . . . . . . .
3.3.1 Auto Repeat Mode On (254 126[mode])(R)
3.3.2 Auto Repeat Mode Off (254 96)(R) . . . .
3.3.3 Auto Transmit Keypresses On (254 65)(R)
3.3.4 Auto Transmit Keypresses Off (254 79)(R)
3.3.5 Clear Key Buffer (254 69) . . . . . . . . .
3.3.6 Poll Keypad (254 38) . . . . . . . . . . . .
3.3.7 Set Debounce Time (254 85 [time])(R) . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
16
16
16
17
17
18
18
18
18
18
19
4 Bar Graphs and Special Characters
4.1 Command List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.1 Initialize Wide Vertical Bar Graph (254 118) . . . . . . . . . . .
4.1.2 Initialize Narrow Vertical Bar Graph (254 115) . . . . . . . . . .
4.1.3 Draw Vertical Bar Graph (254 61 [column][height]) . . . . . . .
4.1.4 Initialize Horizontal Bar Graph (254 104) . . . . . . . . . . . . .
4.1.5 Draw Horizontal Bar Graph (254 124 [column][row][dir][length])
4.1.6 Define Custom Character (254 78 [c][8 bytes]) . . . . . . . . . .
4.1.7 Remember Custom Character (254 194 [c][8 bytes]) . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
19
19
19
19
19
20
20
20
21
5 Fan and GPO Commands
5.1 Display Return Protocol . . . . . . . . . . . . . . . . . . . . . . . .
5.2 Fan and GPO Commands . . . . . . . . . . . . . . . . . . . . . . . .
5.2.1 General Purpose Output Off (254 86 [gpo #]) . . . . . . . . .
5.2.2 General Purpose Output On (254 87 [gpo #]) . . . . . . . . .
5.2.3 PWM Value (254 192 [fan #] [PWM value]) . . . . . . . . . .
5.2.4 Return Fan RPM (254 193 [fan #]) . . . . . . . . . . . . . . .
5.2.5 Remember GPO / PWM State (254 195 [fan #] [PWM value])
5.2.6 Set PWM Base Frequency (254 196 [index]) . . . . . . . . .
5.2.7 Remember PWM Base Frequency (254 197 [index]) . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
21
21
23
23
23
23
23
24
24
25
6 1-Wire Commands
6.1 Device Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3 ROM Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4 Display 1-Wire functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4.1 Transaction command (254 C8 1 [flags] [Send Bits] [Recieve bits] [Send data])
6.4.2 Search command (254 C8 2) . . . . . . . . . . . . . . . . . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
25
25
25
26
26
27
28
7 Miscellaneous Commands
7.1 Command List . . . . . . . . . . . . . . . . . . . . .
7.1.1 Remember (254 147 [0|1]) . . . . . . . . . . .
7.1.2 Set brightness (254 89 [brightness]) . . . . . .
7.1.3 Set brightness and save (254 152 [brightness])
7.1.4 Display on (254 66 [minutes]) . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
28
28
29
29
29
30
Matrix Orbital
VK204-24-USB
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
iii
7.1.5
7.1.6
7.1.7
7.1.8
7.1.9
7.1.10
7.1.11
Display off (254 70) . . . . . . . . . . . . .
Clear Display (254 88) . . . . . . . . . . . .
Load Startup Screen (254 64 [40 characters])
Read Module Type (254 55) . . . . . . . . .
Set Serial Number (254 52 [byte1][byte2]) .
Read Serial Number (254 53) . . . . . . . .
Read Version Number (254 54) . . . . . . .
8 Appendix: Command Summary
8.1 General . . . . . . . . . . . . . .
8.2 Issuing Commands . . . . . . . .
8.3 On Numbers . . . . . . . . . . . .
8.3.1 ASCII Characters . . . . .
8.4 Text Commands . . . . . . . . . .
8.5 Keypad Interface Commands . . .
8.6 Bar Graphs and Special Characters
8.7 Fan and GPO Commands . . . . .
8.8 Miscellaneous Commands . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
30
30
30
31
31
31
31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
31
31
32
32
33
33
35
36
37
38
9 Appendix: Specifications and Options
40
9.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
9.2 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
10 Appendix: Glossary
Matrix Orbital
42
VK204-24-USB
iv
1
Introduction
The VK204-24-USB is equipped with the following features;
•
•
•
•
•
•
•
•
•
•
•
•
•
•
20 column by 4 line text display
Built-in font with provision for up to 8 user-defined characters
USB communication or serial TTL communication
Use up to 100 modules on the same USB host
Fully buffered so that no delays in transmission should ever be necessary
Ability to add a customized Splash / Start-up screen
Use of "Remember" functions to save settings
Use of up to a 24 key keypad with a 10 key buffer
4 Advanced general purpose outputs
3 Low power general purpose ouputs
Horizontal or Vertical bar graphs
Data from USB cable
A perfect fit to Matrix Orbital’s PC Bay inserts without any modifications
Dallas 1-wire Bridge
1.1 What to expect from the VK204-24-USB
The VK204-24-USB is designed as the display unit for an associated controller. The controller may be
anything from a single board, special purpose micro-controller to a PC, depending on the application. The
controller is responsible for what is displayed on the screen of the VK204-24-USB.
The display provides a simple command structure which allows 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.
General purpose outputs allow the controller to switch up to six electronic or electro-mechanical devices
by issuing commands to the display unit. These can be used for controlling LEDs, relays, etc.
1.2 What not to expect from the VK204-24-USB
The display does not include bitmap graphics capability, except those permitted by defining special
characters.
1.3 Keypad Interface
The keypad interface takes row / column input and converts it it ASCII characters, which are delivered
out the USB port to the associated controller.
NOTE The keypad is not used to directly control any aspect of the operation of the
display. The display acts simply as a matrix to serial converter.
Matrix Orbital
VK204-24-USB
1
1.4 Setup for Testing
Before setting up the application, it is best to test out the display. This is easily done with a PC.
The following is a list of requirements for testing;
• An available powered USB source
• USB Drivers which can be located on Matrix Orbital’s website and e-CD
• Test software such as Alpha Demo or Display Tuner
Figure 1: Connections for Testing
Once the above test requirements have been met, the user may proceed with the following steps;
1.
2.
3.
4.
5.
6.
7.
Refer to the diagram above for the following steps.
Download or copy the USB drivers into a directory.
Uncompress the files. They will be a self extracting ZIP file.
Connect the USB cable to the display and the computer.
Windows will give a prompt for drivers for a USB ⇔ Serial Device.
Select "Specify location", and navigate to the directory the file was uncompressed to.
Test the VK204-24-USB.
1.5 Trying out the VK204-24-USB
The unit should be connected to the USB and the custom startup screen should come on.
• Run a PC program such as Hyperterm to experiment with typing text. Make certain it’s configured to
use the correct port. Set the baud rate to 19,200 and turn flow control off.
Matrix Orbital
VK204-24-USB
2
Once this is complete, try typing some characters on the keyboard. The characters should now appear on the
display screen.
Alpha Demo, Display Tuner or MOGD are excellent for basic LCD tests.
1.6 Trying out a Keypad
Since a number of different keypad types can be connected to the display, the results may be a little
unpredictable. At this point the user should make certain the keypad and interface work, and possibly
generate an ASCII map for programming needs.
The keypad interface on the display converts a row / column connection to an ASCII character. By
default, a keypress is transmitted as serial data immediately. Keypad buffering can be selected using the
appropriate commands.
The keypad should be a matrix style or momentary switches. The user can simulate keystrokes by
shorting out a row and column pin.
1.6.1
Here’s what to do:
1. The user’s PC should be running a terminal program, such as Hyperterm.
2. With the display connected to the PC, plug in the keypad. If the connector has fewer pins than the one
on the display, centre it as well as possible.
NOTES
• The keypad connector must be wired with columns on one side and rows on the other
side of the center of the connector. If the keypad isn’t wired this way the user will
need to make an adapter or rewire the connector to meet this requirement.
• The connector is reversible. Reversing the connector will not damage the keypad or
the display, but it will however, change the ASCII character map
3. Press a key on the keypad. An upper case ASCII character (A-X) should appear on the PC screen.
Different keys should generate different characters.
To experiment, reverse the connector to see if it generates a more logical set of characters. Ultimately the
program in the controller will have to ’map’ these characters to the ones marked on the keypad, which will
likely be different.
2
Connections
2.1 Connector Pinout
Refer to the diagram below for this chapter.
Matrix Orbital
VK204-24-USB
3
Figure 2: Electrical Connections
Table 1: Connectors & Functions
Connector
6x 3 Pin White Headers
4x 3 Pin Red Headers
10 Pin dual header
Rx / Tx
10 Pin header
USB
Alt. USB
4 Pin White Header
Matrix Orbital
Function
Dallas 1 wire outputs
Advanced General Purpose Outputs
General Purpose Outputs and +5V Output
Receive and Transmit LED outputs
Keypad
Communication / Power
Alternate USB / Power Header
High Power GPO Power Input
VK204-24-USB
4
Table 2: Mating Connectors
Connector
3 Pin White Header
3 Pin Red Header
10 Pin Dual Header
Rx/Tx
10 Pin Header
USB
Alt. USB
4 Pin White Header
2.1.1
Part #
AMP 173979
MOLEX 43009
MOLEX 42375
MOLEX 42375
MOLEX 42375
MOLEX 67068
MOLEX 42375
AMP 171825-4
Mate Part #
AMP 173977
MOLEX 7879
Many, ex. MOLEX 70058
Many, ex. MOLEX 70058
Many, ex. MOLEX 70058
Standard USB Cable
Many, ex. MOLEX 70058
AMP 170205-1
Power
The display will require between 500mA and 700mA, depending on the model and the number of GPOs
being used.
Figure 3: Jumper Locations
Matrix Orbital
VK204-24-USB
5
Figure 4: Jumpers 1 and 2
The display requires external power. The advantage to this is the display will power up right away;
allowing fans to start, for example, without waiting for the host PC’s OS to enable the display.
Table 3: GPO Power Levels
GPO
+5V Low Power
+5V High Power
+12V High Power
Maximum Power
20mA, current limited
1000mA.
1000mA
WARNINGS
• When using the alternate USB header, verify all the cable pin outs
before applying power. Incorrect power application may damage
the display on one host.
• Make sure the host is capable of supplying all the necessary power.
Add the display power requirement and the GPO power if used for
a total power requirement.
Figure 5: Header
Matrix Orbital
VK204-24-USB
6
Figure 6: Connector Pinout
Pin
Pin 4
Pin 3
Pin 2
Pin 1
Description
+5.0 VDC (normally from PC power supply)
Ground
Ground
+12.0 VDC (normally from PC power supply)
Make certain to have sufficient current capacity to handle the desired load. Each Advanced GPO can
source over 1000mA.
2.1.2
USB Communications
A standard B type USB header is provided on the display for USB communication. The USB cable
provides data to the display. There are two ways of communicating to the display. Under Windows, the
user will have direct access to the display drivers or create a virtual COM Port (VCP). With the VCP, a new
COM Port is created in Windows. Windows 98, Windows ME, Windows 2000, and Windows XP drivers
have been tested and work. VCP drivers are also available for Apple OS-X, OS-8, and OS-9. Linux drivers
are available as well, but have not been tested by us, nor will Matrix Orbital be able to provide any support
for them.
For more information please visit 8bit, no parity, one stop bit.
Speed: 19.2 Kb/s.
Table 4: USB ID
VID 0403
PID
FA00
FA01
FA02
FA03
FA04
Matrix Orbital
Description
USB 2 serial communication
MX 2 / MX 3
MX 4 / MX 5
LK / VK202-24-USB
LK / VK204-24-USB
VK204-24-USB
7
2.1.3
Alternate USB Communications
Figure 7: USB & Alternate USB
Table 5: Connector Pinout
Pin Number
5
4
3
2
1
Matrix Orbital
Description
Ground
NC
D+
D+5V
VK204-24-USB
8
2.1.4
Serial TTL Communication
Figure 8: Rx /Tx LED Header
The display can also be talked to at TTL (logic 0V to +5V) levels. This will allow TTL communications
through the 4-pin header. Communicating by Serial TTL will bypass the USB components and power will
be required to be provided by this header.
WARNING Do not communicate by USB and Serial TTL at the same
time.
8bit, no parity, one stop bit.
Speed: 19.2 Kb/s.
2.1.5
LED Headers
The LED headers provide a visual indication of communication over the Rx and Tx line if a LED is
connected. The LEDs blink frequency will increase as the amount of data increases. The headers are current
limited to 20mA at +5V. This feature only works with USB communication and will not work with Serial
TTL.
Matrix Orbital
VK204-24-USB
9
2.2 General Purpose Outputs
Figure 9: Fan Headers
2.2.1
Advanced General Purpose Outputs & GPO’s 1, 2, 3 and 4
These outputs are capable of controlling high current draw devices, saving power-up state, switching to
PWM mode and report back RPM via Hall effect sensor.
Figure 10: Pin Connectors
Matrix Orbital
VK204-24-USB
10
WARNINGS
•
•
•
•
•
2.2.2
RPM reading should not be used at 5V
There are no current limiting resistors
Maximum current draw is 1000mA
Default voltage setting is 12V
As of Firmware Version 2.1, the default PWM frequency is 19.1Hz
Advanced GPO Power Select
When the jumper is placed in the high power position, the unit supplies +12V to the advanced GPOs. If
the jumper is placed in the low power position, +5V is supplied to the GPOs. For 12V, external power by a
3.5" floppy connector will be required.
12 Volt
5 Volt
Figure 11: High / Low Power Select
The display offers the ability to select between three power options into the Advanced GPO’s.
1. 12V provided by the 3.5" floppy cable; This allows high current draw devices. Setting the jumper
to the left will use 12V from the 3.5" floppy cable.
2. 5V provided by the USB cable; this will be limited to approximately ~100mA of output current per
output. Setting the jumper to the right will use power from the USB host.
3. 5V provided by the 3.5" floppy cable; This allows high current draw devices. Setting the jumper to
the right and performing the modification in Section 2.1.2 will allow power to be used from the 3.5"
floppy cable.
Matrix Orbital
VK204-24-USB
11
2.2.3
General Purpose Outputs 5, 6 and 7
Figure 12: General Purpose Outputs
GPO’s 5, 6 and 7 are low power outputs providing +5V at 20mA enforced by a current limiting resistors.
They are ideal for driving LEDs and relays directly.
2.2.4
Dallas 1-Wire Bridge
The display offers one Dallas 1-wire bridge. All three headers are connected to one communication line.
A maximum of 32 1-wire devices can be connected to the display at a time.
Figure 13: 1-Wire Pinout
2.3 General
Text is displayed on the VK204-24-USB using the built-in 5x8 dot matrix font, in addition to up to 8
user defined characters.
Matrix Orbital
VK204-24-USB
12
2.4 The Built-In Character Font
The display includes a built-in 5x8 dot matrix font with the full range of ASCII characters, plus a variety
of extended characters, as shown in the Figure below.
Figure 14: Character Set
In addition to the built-in characters, users may define up to 8 special characters. Once defined, these
characters occupy positions 0x00 to 0x07 in the above chart. The display does not have provision to download other fonts.
Matrix Orbital
VK204-24-USB
13
2.5 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
which are not defined by the built-in font print as a space.
The position where text is to be inserted is a character location stored in the display’s volatile memory
and maintained internally by the display’s firmware. This position is manipulated by the commands shown
in the following section.
2.6 Text Commands
In this section commands are identified by their names and decimal values.
Some commands marked with an “R”, may be “remembered” to set new defaults that will be in effect
each time the unit is powered on.
2.6.1
Auto Line Wrap On (254 67)(R)
Enables automatic line wrapping. Note that this word is not ’word wrapping’, and wraps may occur in
the middle of a word.
2.6.2
Auto Line Wrap Off (254 68)(R)
Disables automatic line wrapping. Characters beyond the end of a line may be lost.
2.6.3
Auto Scroll On (254 81)(R)
When auto scrolling is on, it causes the VK204-24-USB to shift the entire display’s contents up to make
room for a new line of text when the text reaches the scroll position, which is the bottom right character
position.
2.6.4
Auto Scroll Off (254 82)(R)
When auto scrolling is disabled, text will wrap to the top left corner of the display area. Existing text
in the display area is not erased before the new text is placed. A series of ’spaces’, followed by a “Cursor
Home” command, may be used to erase the top line of text.
Matrix Orbital
VK204-24-USB
14
2.6.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 and 2 (0x01 and 0x02).
2.6.6
Send Cursor Home (254 72)
This command moves the cursor position (text insertion point) to the top left of the display area.
2.6.7
Turn On Underline Cursor (254 74)(R)
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 cursor if off by default.
2.6.8
Turn Off Underline Cursor (254 75)(R)
Turns off the underline cursor. Does not affect the blinking block cursor.
2.6.9
Turn On Block (blinking) Cursor (254 83)(R)
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.
2.6.10
Turn Off Block (blinking) Cursor (254 84)(R)
Turns off the blinking Block Cursor. Does not affect the Underline cursor.
2.6.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.
Matrix Orbital
VK204-24-USB
15
2.6.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 id turned off.
3
Keypad Interface
This chapter describes the keypad interface and associated commands in detail.
3.1 General
The VK204-24-USB keypad interface processes the keypad row / column matrix into a serial data byte
stream. Aside from this processing, the keypad has no effect on the display. To send keystrokes to the
display, they must be routed through the controller.
3.2 Connections
ROW 4
ROW 3
ROW 2
ROW 1
COLUMN 6
COLUMN 5
COLUMN 4
COLUMN 3
COLUMN 2
COLUMN 1
Figure 15: Keypad Connector
The connector is not ’keyed’, so your keypad will probably plug in either of two ways. The display will
not be damaged by reversing the connector. However, the keypad will generate a different ASCII character
mapping for each position. If the connector has fewer than 10 pins it should be centered on pins 6 and 7 of
the connector.
Pins 1 through 6 are columns, and Pins 7 through 10 are rows. The keypad is scanned wherever a key is
passed; there is no continuous key scan. This means that keypresses are dealt with immediately without any
appreciable latency. This also prevents electrical noise which is often caused by continuous key scans.
NOTE Please note that keypads may be laid out in a different pattern. If this is the case,
the user will need to interpret the key codes differently.
Matrix Orbital
VK204-24-USB
16
Table 6: Keypad Layout
Rows
1
2
3
4
1
A
G
M
S
Columns
2 3 4
B C D
H I
J
N O P
T U V
5
E
K
Q
W
6
F
L
R
X
NOTE The keypad connector must be wired with columns on one side and rows on the
other side of the centre of the connector. If the keypad isn’t wired this way the user will
need to make an adapter or re-wire the connector to meet this requirement.
3.3 Keypad Commands
Some commands, marked with an "R", may be "remembered" to set new defaults that will be in effect
each time the unit is powered on.
3.3.1
Auto Repeat Mode On (254 126[mode])(R)
[mode]=0x00 gives Resend Key Code mode
[mode]=0x01 gives Key down / Key up code mode
Two modes of auto repeat are available and are set via the same command.
1. 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.
2. Key down / Key up codes: This code may be used when the typematic parameters of the “Resend key
code” mode are unacceptable or if the unit is being operated in polled mode. The host system detects
the press of a key and stimulates an auto repeat inside the host system until the key release is detected.
In this mode, when a key is held down, the key code is transmitted immediately and no other codes will be
sent until the key is released. On the release of the key, the key release code transmitted will be a value equal
to the key down code plus 20 hex. For example, if the key code associated with key “p”(0x50) is pressed,
the release code is “p”(0x70).
Matrix Orbital
VK204-24-USB
17
Figure 16: Poll Timing
3.3.2
Auto Repeat Mode Off (254 96)(R)
This command turns off the auto repeat mode
3.3.3
Auto Transmit Keypresses On (254 65)(R)
In this mode, all keypresses are sent immediately to the host system without the use of the poll keypad
command. This is the default mode on power up.
3.3.4
Auto Transmit Keypresses Off (254 79)(R)
In this mode, up to 10 keypresses are buffered until the unit is polled by the host system via the poll
keypad command. Issuing this command places the unit in polled mode.
3.3.5
Clear Key Buffer (254 69)
This command clears any unread keypresses. In a menuing 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 to, in effect, reset the
keypad in case the host application resets for whatever reason.
3.3.6
Poll Keypad (254 38)
The host system must be set up to receive the key codes. When the display receives this command it will
immediately return any unbuffered keypresses which may have not been read already. If there is more than
one keypress buffered, then the high order bit (MSB) of this returned keycode will be set (1). If this is the
only buffered keypress, then the MSB will be reset (0). If there are no buffered keypresses, then the returned
code will be 0x00. Please note, in order to make use of this command, the “Auto transmit keypress” mode
should be off.
Matrix Orbital
VK204-24-USB
18
3.3.7
Set Debounce Time (254 85 [time])(R)
This command sets the time between key press and key read. All key types with the exception of latched
piezo switches will ’bounce’ for a varying time, depending on their physical characteristics. The default
debounce time for the module is about 52 mS, which is adequate for most membrane keypads.
4
Bar Graphs and Special Characters
The VK204-24-USB includes the ability to draw bar graphs (either horizontal or vertical) and allows
users to define up to eight special characters.
Eight characters (ASCII values 0x00 to 0x07) are set aside for use with bar graphs, user defined characters, and big numbers. 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 re-defined 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 20 (0x00 to 0x14) 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 bar graph. The graph may be erased
by drawing a bar graph of height=0 in the same column.
Matrix Orbital
VK204-24-USB
19
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 or 0x02, column may range from 0x01 to 0x14 and length may be from 0x00 to 0x64 (0
to 100) if the graph can extend to 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 display allows up to 8 user defined (custom) characters. These characters occupy the first 8 (0x00
to 0x07) places in the character set.
Custom characters occupy a 5x8 pixel matrix. Built-in characters are 5x8; 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:
Table 7: 8 Byte Map
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
1
6
11
16
21
26
31
36
MSB LSB
2
3
4
7
8
9
12 13 14
17 18 19
22 23 24
27 28 29
32 33 34
37 38 39
5
10
15
20
25
30
35
40
Data Byte 1
Data Byte 2
Data Byte 3
Data Byte 4
Data Byte 5
Data Byte 6
Data Byte 7
Data Byte 8
A “1” bit indicates an “on” (black) pixel, while a “0” 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:
Matrix Orbital
VK204-24-USB
20
Table 8: Character Values
1
6
11
16
21
26
31
36
2
7
12
17
22
27
32
37
3
8
13
18
23
28
33
38
4
9
14
19
24
29
34
39
5
10
15
20
25
30
35
40
NOTE Custom characters will be erased if any of the “initialize bar graph” commands
are issued.
Example of a degree symbol:
4.1.7
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
!#"$&%
(') *
+-,/..#0 !&"1 2 ('&354637+8,/..#9
: # !#"
(') ));+-,/..#9< = # ?>&&@ 9;A)BDC
('EF+8,G..HJI&% ; K ('EH+8,G.. ;L9
M # ('EH+8,
('EF+8,
(');+-,
(');+-,
(');+-,
(');+-,
(') ));+-,/.." @ %N9< M & )
Remember Custom Character (254 194 [c][8 bytes])
This command will store a custom character to be used with the “Custom Startup Screen”. It does not
affect or alter the current custom characters that are stored in the unit. The syntax is identical to the previous
command.
5
Fan and GPO Commands
5.1 Display Return Protocol
To facilitate the reporting of information other than keypresses, the “Display Return Protocol”, (DRP)
was developed. This protocol allows the display to return arbitrary information back to the controller. This
Matrix Orbital
VK204-24-USB
21
protocol is used for reading fan speeds and retrieving 1-wire bus information. The basic structure of the
protocol is described in the Table below.
Table 9: Display Return Protocol
Offset
(Bytes)
0
2
3
4
Length
(Bytes)
2
1
1
1–127
Value
Description
0x23 0x2A
Preamble
Continued / Size
Packet Type
Packet Data
The first two bytes is the standard preamble to separate the protocol from returned keypresses. The next
byte is described in the Table below. The CONT flag specifies that the data will be continued in the next
DRP packet. The lower seven bits contains the size of the data section excluding the four byte header. The
type specifies what type of information is contained in the packet. Finally, the data returned is specific to the
packet type.
Table 10: Continued / Size Byte
Bit
7
6
5
4
3
2
1
0
Description
Continued
Packet Size
Table 11: Display Return Protocol Types
Decimal
49
82
Matrix Orbital
Hex
0x31
0x52
ASCII
’1’
’R’
Description
1-Wire data
Fan RPM data
VK204-24-USB
22
5.2 Fan and GPO Commands
5.2.1
General Purpose Output Off (254 86 [gpo #])
This command turns OFF any of the General Purpose Outputs. [gpo #] is 1 to 6.
5.2.2
General Purpose Output On (254 87 [gpo #])
This command turns ON any of the General Purpose Outputs. [gpo #] is 1 to 6.
5.2.3
PWM Value (254 192 [fan #] [PWM value])
This command sets one of the high power GPOs (GPOs 1-4) into PWM mode. This permits speed
control of a fan. A PWM value of 0 is off, 128 is 50% power, and 255 is full power. The fan# can be 1 to 4.
5.2.4
Return Fan RPM (254 193 [fan #])
This command will return a packet to the host with the fan RPM contained in it. The structure of the fan
is described in the Table below.
Table 12: Return RPM Structure
Offset
0
2
3
4
5
Size
2
1
1
1
2
Description
0x232A
0x03
0x52
Fan #
Fan Period (MSB first)
To convert the fan period into an RPM value, follow the following formula;
RPM =
18750000
X ∗n
Where X is the fan period, and n is the number of ticks that the fan produces per period. The number of
ticks is usually 1, 2 or 4. For unknown fans some experimentation is required.
NOTE It is not recommended that the RPM is checked more than once every two seconds.
If the RPM is checked more frequently, the actual RPM readings can become very erratic.
Matrix Orbital
VK204-24-USB
23
5.2.5
Remember GPO / PWM State (254 195 [fan #] [PWM value])
This command will set the startup state for all the GPOs. When the device is powered up the next time,
the GPOs will be set to the values from this command. For GPOs 1 to 3 it behaves exactly as the PWM Value
command. For GPOs 4 to 6, a non-zero value for the PWM value make the GPO on for future startups, a
PWM value of 0 will result in the GPO being off.
This command does not affect the current state of the GPOs or fans, just power up.
5.2.6
Set PWM Base Frequency (254 196 [index])
NOTE This command was added in Firmware Version 1.2. It is not present in previous
versions.
This command sets the base frequency for the PWM modulation. The index selects a present frequency as
shown in the following Table.
Table 13: PWM Base Frequencies
Index
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Frequency
0.3 Hz
0.6 Hz
1.2 Hz
2.4 Hz
4.8 Hz
9.6 Hz
19.1 Hz
38.2 Hz
76.3 Hz
152.6 Hz
305.2 Hz
610.4 Hz
1220.7 Hz
2441.4 Hz
4882.9 Hz
9765.8 Hz
Steps
256
256
256
256
256
256
256
256
256
129
65
33
17
9
5
3
As the frequency increases,the number of valid PWM states will decrease. For example, with an index
of 14, there are only 5 PWM states.
Matrix Orbital
VK204-24-USB
24
Table 14: Example PWM Value for Index =14
Input PWM
0
1-63
64-127
128-191
192-255
Actual PWM
0
25%
50%
75%
100%
Frequencies in the range of 9.6Hz to 38.2Hz are desirable for fan control as they minimize the noise due
to PWM modulation. For visual applications such as controlling cold cathode lights, PWM frequencies of
76.3Hz to 305.2Hz are desirable to minimize flicker.
5.2.7
Remember PWM Base Frequency (254 197 [index])
NOTE This command was added in Firmware Version 1.2. It is not present in previous
versions.
This command will set the PWM frequency for startup. It does not alter the current PWM base frequency.
Refer to the "Set PWM base frequency" command for valid values of index.
6
1-Wire Commands
The 1-wire bus is capable of communicating with many devices over a single wire plus a ground reference. This chapter deals with the capabilities of the display and a brief introduction to the 1-Wire standard.
7(BP0
For more detail consult O
6.1 Device Identification
Each 1-wire device contains a unique 64-bit address in which to identify them with. The address is
guaranteed to be unique from any other device, allowing a virtually unlimited number of devices on to be
attached to the bus. The address itself contains a family code and a cyclic redundancy check (CRC). The
family code is unique to a particular device model. For example, the family code for the DS18S20 temperature probes is 10H. The CRC byte is included as a verification that the correct address was transmitted or
received.
6.2 Protocol
The transaction sequence for accessing a 1-wire device is as follows;
Matrix Orbital
VK204-24-USB
25
• Reset and detect presence.
• ROM command, followed by any required data exchange.
• Device specific function command, followed by any required data exchange.
Before communication can begin, the bus must be reset to force all devices to begin listening. After the
reset, all the devices will transmit a presence pulse which indicates that there is at least one device on the
bus. Once the presence of at least one device has been confirmed, the master must select which group of
devices will be involved in the rest of the transaction. A device will use a ROM command to determine if the
following transaction is intended for it. If not, the device will ignore all communication on the bus until the
next bus reset. Otherwise, the device will read and process the rest of the transaction. The final part of the
transaction is the device specific function command. To determine what functions the device will respond
to, consult the devices’ data sheet.
It is very important to follow this sequence for every transaction. If any of these steps are omitted or
performed in the wrong order, the devices will not respond.
None of the device addresses are known ahead of time, and as such, each of their addresses must be
searched out and determined. The 1-wire bus provides a means of searching the bus for devices and determining their address.
6.3 ROM Commands
The ROM commands allow a device to be singled out for communication or all devices to be included.
This manual only presents the three most used ROM commands. For a more detailed listing and description
of all the ROM commands consult the data sheet for the 1-wire device being used.
• Match ROM [55h]: To single out a device, the Match ROM command is used. After this command
has been issued the 64-bit target address is transmitted in LSB to MSB order. Any device with an
address that doesn’t match will ignore all further communication until the next bus reset.
• Skip ROM [CCh]: After this command, all devices will continue to listen and process the transaction. This is equivalent to broadcasting to all devices. This command is useful when probes need
to be informed to get their measurement ready. With this command all the probes can be instructed
simultaneously.
• Read ROM [33h]: All devices will begin transmitting their address after this command. This command will only succeed when there is one device on the bus. When multiple devices are present, all
devices will begin transmitting their addresses, overlapping each other. This command can be used
to determine if there is more than one device on the bus. After the address has been read back, if the
CRC is valid, there is only one device on the bus. Otherwise, there are multiple devices on the bus and
each address must be searched out.
6.4 Display 1-Wire functions
The transaction command allows data to be put onto the bus and read off the bus for transactions. And
the search command identifies all the devices on the bus for further communication.
Matrix Orbital
VK204-24-USB
26
6.4.1
Transaction command (254 C8 1 [flags] [Send Bits] [Recieve bits]
[Send data])
The transaction 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.
Table 15: 1-Wire Transaction
Offset
(Bytes)
0
Length
(Bytes)
1
Name
Description
Flags
The flags byte controls the optional
components of the transaction.
The number of bits that will be
transmitted onto the bus. The actual
bits to be transmitted are held in the
Send Data section.
The number of bits to read off the
bus after the data to be put on the
bus has been sent.
The data to be transmitted onto the
bus. The data is transmitted MSB
to LSB in the order that they are received.
1
1
Send Bits
2
1
Receive Bits
3
Variable
Send Data
Table 16: 1-Wire Flags
Bit
7
6
5
4
3
2
1
0
Description
Unused
(0 for future compatibility)
Add a CRC8 to the end of the transmitted data
Unused (0 for future compatibility)
Assume last received byte is CRC8 and validate it
Reset bus before transaction
The received data is sent back using the “Display return protocol”. The return type will be 0x31 or ’1’,
and the error codes are described in the Table below.
Matrix Orbital
VK204-24-USB
27
Table 17: 1-Wire Error
Code
0x00
0x01
0x02
0x03
6.4.2
Description
Success
Unknown 1-Wire command
No devices on the bus
Fatal search error
Search command (254 C8 2)
This is used to find the addresses of all 1-Wire devices on the bus. After this command the display will
return one or more “Display return protocol” packets containing either an error code or addresses of 1-wire
packets. The structure of these packets is shown in the Table below.
Table 18: Search Return Packet
7
Offset
(Bytes)
0
2
Length
(Bytes)
2
1
3
4
5
13
1
1
8
1
Description
0x232A - Preamble
0x8A - Packet is 10 bytes long, another address will follow.
0x0A - Packet is 10 bytes long, this
is the last address
0x31 - 1-Wire Packet Type
Error Code (0x00 for success)
1-Wire Address
CRC8 - 0x00 means the last address
was valid
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.
7.1 Command List
Some commands, marked with an “R”, may be "remembered" to set new defaults that will be in effect
each time the unit is powered on.
Matrix Orbital
VK204-24-USB
28
7.1.1
Remember (254 147 [0|1])
This command allows a number of settings such as cursor state to automatically be stored in non-volatile
memory so they become new defaults. The command should only be used when required for two reasons;
1. Writing to non-volatile memory is time consuming and slows down the operation of the display.
2. Non-volatile memory has a "write limit" and may only be changed approximately 100,00 times.
Commands which may be used with the remember function are marked with an "R" in the default column
in the command tables.
The example shows the procedure to set “Auto scroll on” as the default condition. Commands are shown
in both decimal and hex in the example below:
Table 19: Command Example
Decimal
254 147 1
254 81
Hex
FE 93 01
FE 51
254 147 0
FE 93 00
Function
Turn on “remember” function
Turn on auto scroll. Since “remember” is ON, this setting will be saved
in non-volatile memory
Turn off “remember” function
Any number of commands may be entered between the “remember ON”, and “remember OFF” commands, and all settings will be memorized.
7.1.2
Set brightness (254 89 [brightness])
This command sets the displays brightness to [brightness], where [brightness] is a value between 0x00
and 0x03 (between 0 and 3) according to the Table below.
Table 20: Brightness Settings
Hex Values
0x00
0x01
0x02
0x03
7.1.3
Brightness
25%
50%
75%
100%
Set brightness and save (254 152 [brightness])
Same as “Set brightness”, but saves [brightness] into memory.
Matrix Orbital
VK204-24-USB
29
7.1.4
Display on (254 66 [minutes])
This command turns on the display for a time of [minutes] minutes. The maximum value of [minutes] is
100. If [minutes] is zero (0), the display will remain on indefinitely.
7.1.5
Display off (254 70)
This command turns the display off.
7.1.6
Clear Display (254 88)
This command clears the display and resets the text insertion point to the top left of the screen.
7.1.7
Load Startup Screen (254 64 [40 characters])
This command sets and memorizes the startup screen that will appear each time the VK204-24-USB is
turned on. By default the screen shows;
Table 21: Default Screen
Matrix Orbital
VK204-24-USB
Table 22: Default Screen
Character 1
Character 21
Character 41
Character 61
Character 20
Character 40
Character 60
Character 80
If sending more then 10 characters to be stored, add in ~10ms per character delay. Predefined custom
characters can be used in the “Startup Screen” as well, by using 0x00 through 0x07 characters.
Matrix Orbital
VK204-24-USB
30
7.1.8
Read Module Type (254 55)
This command will return the model type value of the module as a 1 byte hex value. Values for various
modules at the time of this publication are as follows;
Table 23: Module Values
LCD0821 - 0x01
LCD4021 - 0x06
LK204-25-0x09
VFD2041-0x0C
VK204-25 - 0x0F
GLK24064-25 - 0x15
LK402-12 - 0x33
LK202-24-USB - 0x36
VK204-24-USB - 0x39
7.1.9
LCD2021 - 0x03
LCD4041 - 0x07
LK404-55 - 0x0A
VFD4021 - 0x0D
GLC12232 - 0x10
GLK12232-25 - 0x22
LK162-12 - 0x34
VK202-24-USB - 0x37
LCD2041 - 0x05
LK202-25 - 0x08
VFD2021 - 0x0B
VK202-25 - 0x0E
GLC24064 - 0x13
LK404-AT - 0x31
LK204-25PC - 0x35
LK204-24-USB - 0x38
Set Serial Number (254 52 [byte1][byte2])
Modules may be delivered with the serial number blank. In this case the user may set the desired 2 byte
serial number using this one time only command.
Upon the execution of this command, the module will echo these two bytes back over the RS-232 interface. The serial number may be set only once. Any future attempt to execute this command will result in no
change and the module will return to the originally set serial number.
7.1.10
Read Serial Number (254 53)
This command will return a 2 byte hex value.
7.1.11
Read Version Number (254 54)
This command will return a 1 byte hex value.
8
Appendix: Command Summary
8.1 General
The operation of the display is controlled by a simple and consistent command set. Commands control;
Matrix Orbital
VK204-24-USB
31
•
•
•
•
Text display
Graphic display
Keypad interface
Miscellaneous operating parameters
This chapter includes summary tables of all commands.
8.2 Issuing Commands
Commands are issued to the display by the controller. In a test setup, commands can be issued to the
display by means of a BASIC program, using the chr$() function. In the tables below, commands are shown
in hex, ASCII and decimal form. All commands begin with the prefix character 0xFE (254 decimal). These
commands are issued on the serial communications link USB, at the currently defined baud rate.
For example (using a BASIC setup), the user could issue the command to clear the screen on the display
by including the line;
QR 4&S<ET7 #U 'FV0W<+8,7 ;U 'HH+
Or with C , the user could (using Zcomm serial library)
XY PEBZ0[ X Y PEBZ0[ Y \#$&% =') 2+M,
Y \#$&% ='&3^]637+_,
8.3 On Numbers
Like all computerized devices, the VK204-24-USB operates with commands and values in the form of
binary numbers. These binary numbers are arranged in 8 digit (i.e, 8 bit) groups called bytes. The decimal
value of a byte may have any value from 0 to 255.
Bytes are usually specified in either decimal or hexadecimal (base 16) form for convenience, since binary
numbers are confusing 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) are
shown in the Table below.
Table 24: Hex Value Table
Binary
0000
0001
0010
0011
0100
0101
0110
0111
Matrix Orbital
Hex
0
1
2
3
4
5
6
7
Decimal
0
1
2
3
4
5
6
7
Binary
1000
1001
1010
1011
1100
1101
1110
1111
VK204-24-USB
Hex
8
9
A
B
C
D
E
F
Decimal
8
9
10
11
12
13
14
15
32
Based on the table, the byte 01001011 can be represented in hex as 4B, which is usually written as any
of 4Bh, 4BH, 4B hex or 0x4B.
The numbers can be expressed in decimal form if preferred.
8.3.1
ASCII Characters
Since computers deal internally with numbers only, but externally with both letters and numbers, several
schemes were developed to ’map’ written characters to numeric values. One such scheme has become
universal; the American Standard Code for Information Interchange, or ASCII. ASCII tables are readily
available from a number of sources. A few examples will do here;
Table 25: Example of an ASCII Table
The letter
The letter
The number
The number
A
a
0
9
has a value of
has a value of
has a value of
has a value of
65 decimal or
97 decimal or
48 decimal or
57 decimal or
41 hex
61 hex
30 hex
39 hex
This gives rise to the possibility of confusion when parameters are being set on the VK204-24-USB.
For example, the GPO ON and OFF commands use a number to indicate which GPO is being controlled.
We’re told that acceptable values are 0 to 6. All such parameters must use numeric values (i.e, actual byte
values). If we send the ASCII number by mistake it will actually give the value of 48 decimal (30 hex) to
the parameter, which is wrong.
In the tables given in the following sections ASCII characters are shown as ’A’, with single quotes.
8.4 Text Commands
Syntax in the tables below are given in hex, decimal and decimal with ASCII, in that order, one per line.
NOTE The letter “R” in the default column indicates that this state can be saved to nonvolatile memory with the “Remember” command.
Table 26: Text Commands
Command
Auto line wrap on
Matrix Orbital
Syntax
FE 43
254 67
254 “C”
Default
on
R
VK204-24-USB
Notes
Enables
line
wrapping
(not
word wrap).
33
Command
Auto line wrap off
Syntax
FE 44
254 68
254 “D”
FE 51
254 81
254 “Q”
Default
on
R
Notes
Disables
wrapping.
off
R
Auto scroll off
FE 52
254 82
254 “R”
off
R
Set cursor position
FE 47 [col][row]
254 71 [col][row]
254 “G” [col][row]
n/a
Send cursor home
FE 48
254 72
254 “H”
Underline cursor on
FE 4A
254 74
254 “J”
FE 4B
254 75
254 “K”
FE 53
254 83
254 “S”
FE 54
254 84
254 “T”
Enables scroll at
bottom of screen.
Text will push
display up one
line to make room
for new line.
Disables
auto
scroll. Text will
wrap to top left
and
overwrite
existing text.
Moves
cursor
to the specified
column and row.
The cursor marks
the text insertion
point in this and
all commands.
This
command
moves the cursor
to the top left of
the display area.
Turns on the underline cursor.
Auto scroll on
Underline cursor off
Block cursor on
Block cursor off
Matrix Orbital
off
R
R
Turns off the underline cursor.
on
R
Turns on the
blinking
block
cursor.
Turns off the
blinking
block
cursor.
R
VK204-24-USB
line
34
Command
Cursor left
Syntax
FE 4C
254 76
254 “L”
Cursor right
FE 4D
254 77
254 “M”
Default
Notes
Moves the cursor 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.
Moves the cursor one position
to the right. If the
cursor is already
at the end of a line
it will move to the
beginning of the
other line.
NOTE The letter “R” in the default column indicates that this state can be saved to nonvolatile memory with the “Remember” command.
8.5 Keypad Interface Commands
Table 28: Keypad Interface Commands
Command
Auto repeat mode on
Syntax
FE 7E [0x00 | 0x01]
254 126 [0|1]
254 “~”[0|1]
Default
off
R
Auto repeat mode off
FE 60
254 96
254 “‘”
FE 41
254 65
254 “A”
off
R
Auto transmit key presses
on
Matrix Orbital
on
R
VK204-24-USB
Notes
Applies to keypad
only.
0x00 = 200 ms
typematic, 0x01 =
key down/key up
codes sent.
Applies to keypad
only.
Sets auto transmit
mode for keypad.
Key presses are
transmitted
to
host
without
polling.
35
Command
Auto transmit key presses
off
Clear key buffer
Poll keypad
Set debounce time
Syntax
FE 4F
254 79
254 “O”
FE 45
254 69
254 “E”
FE 26
254 38
254 “&”
Default
off
R
FE 55 [time]
254 85 [time]
254 “U” [time]
52 ms
R
n/a
n/a
Notes
Up to 10 keypresses buffered
until polled.
Clear unread keypresses.
Returns buffered
keypresses
to
application. Returns 0x00 if
no key presses.
High order bit
set unless this is
the last/only key
press.
Resolution: 1 =
0.6554 ms [time]
is a numeric multiplier.
8.6 Bar Graphs and Special Characters
The commands in this section are used to define and display bar graphs and special characters.
Table 30: Bar Graphs and Special Characters
Command
Initialize wide vertical bar
graph
Initialize narrow bar graph
Draw vertical bar graph
Initialize horizontal bar
graph
Matrix Orbital
Syntax
FE 76
254 118
254 “V”
FE 73
254 115
254 “s”
FE 3D [col][height]
254 61 [col][height]
254 "=" [col][height]
FE 68
254 104
254 "h"
VK204-24-USB
Notes
Initialize the user character set to
make wide vertical bar graphs.
Initialize the user character set to
make narrow vertical bar graphs.
Draws a vertical bar graph at column
[col] of height [height]. Height is
measured in pixels (0x00 to 0x14).
User must first use the "v" or "s"
command to initialize characters.
Initialize the user character set to
make horizontal bar graphs.
36
Command
Draw horizontal bar graph
Syntax
FE 7C [c][r][d][length]
254 124 [c][r][d][length]
254 "|" [c][r][d][length]
Define custom character
FE 4E [c][8 bytes]
254 78 [c][8 bytes]
254 “N” [c][8 bytes]
FE C2
254 194 [c][8bytes]
254 [c][8bytes]
Remember custom character
Notes
Draws a horizontal bar graph starting at column [c] on row [r] with
direction [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.
Defines one of 8 custom “user” characters. Character number is [c] between 0x00 and 0x07.
This command will store a custom
character to be used with the Custom Character Startup Screen.
8.7 Fan and GPO Commands
Table 32: Fan and GPO Commands
Command
General purpose output off
Syntax
FE 56
254 86
254 “V”
Default
Off
General purpose output on
FE 57
254 87
254 “W”
Off
PWM Value
FE C0 [fan #][PWM value]
254 192 [fan #][PWM
value]
254 [fan #][PWM value]
0
Return fan RPM
FE C1 [fan #]
254 193 [fan #]
254 [fan #]
n/a
Matrix Orbital
VK204-24-USB
Notes
This
command
turns OFF any
of the General
Purpose Outputs.
[gpo#] is 1 to 6.
This
command
turns ON any
of the General
Purpose Outputs.
[gpo#] is 1 to 6.
This
command
sets one of the
high power GPOs
(GPOs 1-4) into
PWM mode.
This
command
will return a
packet to the host
with the fan RPM
contained in it.
37
Command
Remember GPO / PWM
state
Set PWM base frequency
(New in Firmware Version
1.2)
Remember PWM base frequency
(New in Firmware Version
1.2)
Syntax
FE C2 [fan #][PWM value]
254 195 [fan #][PWM
value]
254 [fan #][PWM value]
FE C4 [index]
254 196 [index]
Default
n/a
FE C5 [index]
254 197 [index]
6
6
Notes
This
command
will set the startup
state for all the
GPOs.
This
command
sets the base
frequency for the
PWM
modulation.
This
command
will set the PWM
frequency
for startup.
8.8 Miscellaneous Commands
NOTE The letter “R” in the default column indicates that this state can be saved to nonvolatile memory with the “Remember” command.
Table 34: Miscellaneous Commands
Command
Remember
Syntax
FE 93 [0|1]
254 147
Default
off
Clear display
FE 58
254 88
254 “X”
n/a
Set brightness
FE 59 [brightness] 254
89 [brightness] 254 ’Y’
[brightness]
0xFF
255
Matrix Orbital
VK204-24-USB
Notes
Turns the “remember” function on [1] or off
[0].
Clears screen of
text and graphics,
places text cursor
at top left.
Sets
display
brightness.
Brightness is a
value between 0
and 255 (hex 0
to FF). Larger =
brighter.
38
Command
Set brightness and save
Syntax
FE 98 [brightness]
254 152 [brightness]
Display on
FE 42 [minutes]
254 66 [minutes]
Display off
FE 46
254 70
Load startup screen
FE 40 [40 char]
254 64 [40 char]
254 “@” [40 char]
Matrix Orbital
VK204-24-USB
General purpose output off
FE 56 [gpo #]
254 86 [gpo #]
254 “V” [gpo #]
off
General purpose output on
FE 57 [gpo #]
254 87 [gpo #]
254 “W” [gpo #]
off
Read module type
FE 37
254 55
254 “7”
FE 34 [byte1][byte2]
254 52
[byte1][byte2]
254 “4” [byte1][byte2]
see table
Set serial number
Read serial number
FE 35
254 53
254 “5”
Read version number
FE 36
254 54
254 “6”
Matrix Orbital
VK204-24-USB
Default
0xFF
255
Notes
Same as “Set
brightness”, but
saves [brightness]
into memory.
This
command
turns the display
on for a time
of
[minutes]
minutes.
This
command
turns the display
off.
Loads new startup
screen (40 characters).
Screen
is remembered for
subsequent power
ups.
Turns a general
purpose output
OFF. [gpo #] may
be from 1 to 6.
Turns a general
purpose output
ON. [gpo #] may
be from 1 to 6.
Reads the module
type.
This is a onetime-use
command
which
works only on
units
without
factory set serial
numbers.
Reads the two
byte serial numbers
of
the
module.
Reads
the
firmware
version number of
the module.
39
9
Appendix: Specifications and Options
9.1 Specifications
Table 36: Environmental Specifications
Operating Temperature
Storage Temperature
Operating Relative Humidity
Standard Temperature
0C to +50C
-20C to +70C
90% max non-condensing
Table 37: Electrical Specifications
Supply Voltage
Supply Current
5.00 = Vdc
500mA - 700mA typical
Table 38: Optical Characteristics
Number of characters
Matrix format
Display area
Character size
Character pitch
Line pitch
Dot size
Dot pitch
LED Backlight life
Matrix Orbital
40 (20 characters by 2
lines)
5x8 with underline
70.8 x 11.5 mm XxY
2.4 x 4.7 mm (XxY), not
including underline
3.6 mm
6.1 mm
0.4 x 0.5 mm (XxY)
0.5 x 0.7 mm (XxY)
350cd/m2 (100fL) min
VK204-24-USB
40
Figure 17: Physical Layout
Matrix Orbital
VK204-24-USB
41
9.2 Options
Table 39: 20 x 4 Filters Available on VK204-24-USB
VFD Grey
VFD Blue
VFD Red
VFD Green
10
Circular Polarized and Hard Coated
Grey VFD Filter
Standard Blue VFD Filter
Standard Red VFD Filter
Standard Green VFD Filter
Appendix: Glossary
Table 40: Appendix: Glossary
ASCII
Brightness
Baudrate
Binary Number
Bit
Bitmap
Byte
CCFL
Matrix Orbital
American Standard Code for Information Interchange.
A 7 bit binary code representing the English alphabet, decimal numbers and common punctuation marks.
Also includes control characters such as carriage return or end of text. An 8 bit superset of the standard
ASCII codes is often used today to include foreign
characters and other symbols. These supersets are often called extended ASCII character sets.
The brightness of text displayed on the screen.
The (data and signaling) bit transmission rate of an RS232 device.
A number written using binary notation which only
uses zeros and ones.
The smallest unit of information a computer an work
with. Each bit is either 0 or 1. Binary digit.
A representation, consisting of rows and columns of
dots, of a graphics image in computer memory. The
value of each dot (whether it is filled in or not) is stored
in one or more bits of data.
A grouping of eight binary bits.
Cold Cathode Fluorescent Lamp. A high brightness
backlighting source consists of a fluorescent tube powered by a high voltage A.C. source.
VK204-24-USB
42
Configuration
Controller
Firmware
Font
Font Metric
Hexadecimal
Interface
LCD
Module Type Value
Pixel
Pre-Generated Fonts
Primitive
Scroll
Serial Number
Serial Port
Matrix Orbital
The way a system is set up, or the assortment of components that make up the system. Configuration can
refer to either hardware or software, or the combination of both.
The micro-controller or PC used to control the Matrix
Orbital display unit.
Software (programs or data) that has been written onto
read-only memory (ROM). Firmware is a combination of software and hardware. ROMs, PROMs and
EPROMs and flash EEPROMs that have data or programs recorded on them are firmware.
A design for a set of characters. A font is the combination of typeface and other qualities, such as size, pitch,
and spacing.
A definition of where font is to be placed, such as margins and spacing between characters and lines.
Refers to the base-16 number system, which consists
of 16 unique symbols: the numbers 0 to 9 and the letters A to F. For example, the decimal number 15 is
represented as F in the hexadecimal numbering system. The hexadecimal system is useful because it can
represent every byte (8 bits) as two consecutive hexadecimal digits. It is easier for humans to read hexadecimal numbers than binary numbers.
A means by which two systems interact.
Liquid Crystal Display.
This refers to the model number of the module.
The smallest individually controllable element of a
display.
Pre-determined fonts which can be downloaded into
graphic liquid crystal displays.
A low-level object or operation from which higherlevel, more complex objects and operations can be
constructed. In graphics, primitives are basic elements,
such as lines, curves, and polygons, which you can
combine to create more complex graphical images.
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.
A number that is one of a series and is used for identification of the module.
A port, or interface, that can be used for serial communication, in which only 1 bit is transmitted at a time.
VK204-24-USB
43
Version Number
Volatile Memory
Matrix Orbital
This refers to the firmware revision number of the
module.
Temporary memory. Once the power supply is turned
off volatile memory is then erased.
VK204-24-USB
44
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement