beautypg.com

8 appendix: command summary, 1 general, 2 issuing commands – Matrix Orbital LK204-24-USB User Manual

Page 36: 3 on numbers

background image

7.1.13 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 LK204-24-USB is controlled by a simple and consistent command set. Commands

control;

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;

‚¢ƒ

©R¡§8„`i…U

05†

9p¡‡Hˆ`CVDU

0Y†

9r¢r)C

Or, with C the user could (using Zcomm serial library)

‰'

"¡"‘i!f!’H“

0

$

2



”"¡"5687

$

2a9A

%

P¡2)CwD

‰'

"¡"‘i!f!’H“

0

$

2



”"¡"5687

$

2a98Q–•TQUC—D

8.3 On Numbers

Like all computerized devices, the display 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) as shown

in the Tale below.

Matrix Orbital

LK204-24-USB

32