Using bitmapped parameters, Reading / writing bitmapped parameters, Command syntax – Zektor Palladia™ 8X8 User Manual

Page 31: Acknowledgement (the command has no errors), Query response indicating the power is on, Leaving the new “xs” value to be: 1

Advertising
background image

HDA800(V2) Serial Protocol, Version 1.3, 9/12/13

31

Command Syntax

^+$

<-

Acknowledgement (the command has no errors)

^=P 1$

<-

Query response indicating the power is on.

Using Bitmapped Parameters

Reading / Writing Bitmapped Parameters

Some commands accept “Bitmapped” parameters. These are decimal values that represent a series of
flags, or bits, that control, enable and/or disable different device operations.

Binary arithmetic is used to represent bitmapped parameters, it is assumed the reader has some famil-
iarity with binary arithmetic.

An example of a command that uses a bitmapped parameter is the “XS settings” command, which is
defined as:

^XS settings$

Where ‘settings’ is a bitmapped parameter defined as:

For information on what each bit of the XS command does, see: “‘XS’ Control Settings” on page 41.

The “Value” row, in the table’s header, refers to the values, that when added together, create the deci-
mal parameter used by the command. For instances if you want the bits ‘ASY’ and ‘IRS’ to be set to 1,
and the rest of the bits set to zero, the parameter’s value would be calculated as: 1+1024, making the
parameter value: 1025.

The command to set those two bits to ones, and reset all the others would be:

^XS 1025$

Individual bits of a bitmapped parameter can be set or reset without affecting the other bits, by prefix-
ing the bitmapped parameter with a ‘+’ to set individual bits, or a ‘-’ to reset individual bits.

For instance in the above example the bitmapped value has been set to 1025. If we would now like to
enable the IR jack, by setting the ‘IRJ’ bit, the following command can be issued:

^XS +2048$

The will set the ‘IRJ’ bit, and have no affect on the others, and the new “XS” value would be: 3073

If we’d like to now disable the IR jack and the IR sensor, by clearing the ‘IRJ’ and ‘IRS’ bits, we’d use
the value “2048+1024, or 3072 and issue the command:

^XS -3072$

leaving the new “XS” value to be: 1.

Value

32768

16384

8192

4069

2048

1024

512

256

128

64

32

16

8

4

2

1

Bit Position

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

Name

AMU

VMU

12V

AON

IRJ

IRS

IRE

KYE

CHG

SET

CSE

CRE

CHN

ECO

ACK

ASY

Default:

1

0

0

1

1

1

0

0

1

1

0

1

0

1

1

1

Advertising