Command principle and structure, 1 midra™ control principle, 2 write command structure – Analog Way MIDRA PLATFORM TPP Current Programmer's Guide User Manual

Page 7: 3 read command structure, Picture 2 : write command example

Advertising
background image

7

PROGRAMMER'S GUIDE FOR v01.02.11

2.4 Command principle and structure

2.4.1 Midra™ control principle

Midra™ functionalities are controlled through commands. Those commands allow reading or writing in

machine registers.

The product should be considered as a state machine controlled by writing to its registers. Writing into

registers modifies machine state. Current state of the machine is always available by reading its registers.

Registers structure and size can range from a simple bit up to multidimensional array of 32 bits words.

As a result, writing in such a multidimensional register requires providing indexes values in addition to the
register value.

Each register have a unique name, only made of five letters, upper case or lower case. (2 exceptions, 1

letter name command)

A command is made only of displayable ASCII characters (ranging from 0x21 up to 0x7E).

Commands are of 2 types : read commands or write commands, using the same syntax.

a write command is made of indexes values, followed by the register value and ended by the register
name.

a read command uses exactly the same syntax, except the register value that is omitted.

2.4.2 Write command structure

A write command is made of numeric values separated by comma, followed by a group of up to 5

letters defining the command.

Picture 2 : write command example

The last numerical field is the value to be set by the write command.

The first numerical fields are “indexes values”, specifying on which the command relates. The number

of indexes can range from 0 to 5 depending on the command.

(details in chapter

§Command indexes and Command values

)

Each command is ended with the last command character.

2.4.3 Read command structure

A read command follows the same structure than the write command, simply with the value field

omitted. Please note that an index value is always followed by a comma character.

Advertising
This manual is related to the following products: