Word (16-Bit) Values

Some commands require a 16-bit word describing the parameter. All these 16-bit values must be sent in the form of high byte first and low byte next. That means that to send a value such as decimal 345 (= 0x159) to the iLCD Controller, 0x01 followed by 0x59 has to be sent.

In the chapter Command Description, 16-bit parameters are always described as type "word" in the corresponding parameter tables.

Syntax in iLCD Manager XE:

\iG\D333
\iG\X14D
\iG\d1\d77
\iG\x1\x4D

All above notations represent the same value (333 resp. 0x14D). Note that word values may also be specified by a pair of bytes. Refer to Syntax used in iLCD Manager XE for further information about these introducters.

The actual bytes sent via the interface can be verified in the "Hex" part of any editor panel. The sequence for the above example would look like this:

[AA][47][01][4D]

Bit Mask Words

In bit mask words, every single bit can be interpreted as a boolean flag. Bits not defined in the parameter are ignored (refer to according tables in chapter Command Description).

In parameter tables, word bit masks are always described as "wbits".

Syntax in iLCD Manager XE:

\iILs\XA\D1280

This turns on outputs #1 and #3 (Hex 0xA = Bin 0000 0000 0000 1010) and sets outputs #8 and #10 (decimal 1280 = Hex 0x500 = Bin 0000 0101 0000 0000) to blink.

The actual bytes sent via the interface can be verified in the "Hex" part of any editor panel. The sequence for the above example would look like this:

[AA][49][4C][73][00][0A][05][00]

Signed Words

Signed words have a value range from decimal –32768 to +32767. If the value is positive, the hex value is the simple hex representation of the decimal value; if it is negative the calculation can be done as follows:

hex value = hex(65536 – abs(value))

This means a value of 0x8000 represents decimal –32768 and a value 0xFFFF decimal –1. The decimal value 10000 translates to 0xD8F0.

Please note that signed words have to be sent in the order: high byte first, low byte next (same as for standard 16-bit values).

Syntax in iLCD Manager XE:

\iCc\D-300
\iCc\XFED4

All above notations represent the same value (-300 resp. 0xFED4).

The sequence sent via the interface for this example would look like this:

[AA][43][63][FE][D4]