Command syntax

All commands have same structure:

If commands transferred via serial interface

Start

Command code

Parameter

Termination

Comment

#

XXX

123, $52, %01101010, "Hello"; R0

LF

Terminator after string is ; otherwise , or ;

ASCII :    35 (0x23)

UniCode: 35 (0x23 0x00)

3-letter command

Parameters

ASCII :    10 (0x0A)

UniCode: 10 (0x0A 0x00)

CR 13 (0x0D) is optionally

All commands start with "#", followed by letters, digits and commas or semicolons. These are transmitted as ASCII or Unicodes.

Sometimes it is useful to transfer single parameters hexadecimal or binary (see "Parameters").

In any case all commands and data are additionally packed into a ShortProtocol or SmallProtocol. For the first "walking attempts" it is recommended to switch Protocol off temporarily (pin DRPOT to GND).


If WYSIWYG tool "uniTFTDesigner" is used

Start

Command code

Parameter


Comment

#

XXX

123, $52, %01101010, "Hello"; R0


/** This is a comment

ASCII :    35 (0x23)

UniCode: 35 (0x23 0x00)

3-letter command

Parameters


ASCII 47 42 42 (0x2F 0x2A 0x2A)




Parameters

Numbers



123

decimal passed as ASCII characters


$5A

hexadecimal  passed as ASCII character


%1010001

binary passed as ASCII character


5-8

Passing of a range. Commands influencing multiple objects can be passed using an object range. The given example relates to object-IDs 5,6,7,8


?x

Code of a single character (Unicode/ASCII)


R0 ... R499

Passing a register value


Q0 ... Q499

Indexed passing of a register value (pointer) R (R0 ... R499)


(....)

Calculation-string used for return value


G len32 data....

Transfer binary data: len32 defines the data length (already passed as binary 32-bit value)


!index!

Use values of a string file's index


A0..A199I0..maxindex

Access array: A3I42 or A(R0)I(R5+1)

Strings



"string" or 'string'

standard string passing


"str" 32 "str"

simple string with any code in between, which is incorporated into the final string


"str1"; "str2"

Semicolon represents the string ending. Important if passing two strings or following parameters after a string.


S0 ... S499

Passing string registers


T0 ... T499

Passing string registers using a register as index S(R0 ... R499).


U"Hello"

Interpret characters after U as 16 bit uni code (until next # or V, also CR + LF)


V"Hello"

Interpret characters after U as 8 bit  ASCII (until next # or U, also CR + LF)


!index!

Use string of a string file's index


A0..A199I0..maxindex

Access array: A3I42 or A(R0)I(R5+1)


X0..X9

X0 = Last found Regular Expression; X1..X9 = individual subranges of the Regular Expression


Each parameter is separated by blank (' '), comma (','), semicolon (';') or point ('.'). For separating strings you have to use a semicolon.


Termination of commands

After transmission of a command with all its parameter it need to be terminated by LF (0x0A). A leading CR (0x0D) is optionally and skipped.


Comments

  • Display/direct communication
    Comment text can be inserted in macro files. A comment starts with #- and is valid until the end of line / command termination (LF). Applies to direct communication via one of the serial ports at runtime.
  • uniTFTDesigner
    Here a comment starts with /** and is valid until the end of the line. To save memory space in the display, these comments are not stored in the display. Comments appear in gray in the uniTFTDesigner.



Calculation

Every numerical parameter can be replaced by a calculation string. The calculation needs to be inside parentheses () to be passed as one parameter. The documentation on calculation commands lists all operations and functions, including mathematical, logical as well as module-specific operations, e.g. time or object properties.


Path specifications

There are three ways to locate a file with/without path specification. Attention: The path and file specification is case sensitive.


Absolute path specification

</folder/folder/project/picture/test.epg>

#PPP 1,</folder/folder/project/picture/Test.epg>,100,100

Relative path specification

<p:/picture/Test.epg>

#PPP 1,<p:/picture/Test.epg>,100,100

Default path

"Test.epg"

#PPP 1, "Test.epg";100,100 (Attention: Semicolon after the text)


  • The absolute path specification should be used to work with files outside the given project path.
  • The project path, defined by the #XPS command, is used for simplification. There is no need to specify the parent directories. By entering "p:" in front of the path specification, the project path is inserted automatically.
  • Furthermore, there are a number of default folders that are automatically created below the project folder and must never be changed. Otherwise, command parameters that automatically access these folders may no longer work! Subfolders are not allowed in this area.



Angle, definition

Angles are specified in the mathematical direction of rotation, i.e. counter-clockwise.

The input of negative angles is possible.




Object range, addressing several objects simultaneously

With commands which have the property to influence one or more objects (marked by: Object-id...), the specification of the object range can be indicated by a hyphen "-". For example, the command #ODI 1-99 deletes all objects with IDs 1 to 99.


Alternatively, a list of several objects can be defined. e.g. #ODI 1,2,5,100


Transfer of binary data

Normally the display expects all data/parameters as ASCII characters, e.g. for the value 4242 the 4 digits 0x34 0x32 0x34 0x32.

However, for microcontroller applications it means an increased effort to convert 8-, 16- or 32-bit values into ASCII representation for transmission. With the instruction "G len32 data...." these values can be transferred directly. In the following example, register 27 is to be set to the value 4242.

The instruction letters (in yellow) are followed by the identifier "G" for binary data. The length is calculated as follows: register ID (16 bits) + register contents (32 bits) = 6 bytes. The transmission of the data takes place in each case in little-endian format (Intel):



Hint: since a length specification of the binary data is made together with the switch "G", the transmission can be continued in ASCII afterwards.