Syntax used in iLCD Manager XE

iLCD Manager XE contains a terminal emulation allowing you to enter all possible commands used for iLCD Controllers in an easy-to-use way. Most simple terminal emulation programs do not allow you to enter non-ANSI characters like the command introducer (\i resp. 0xAA) and so trying to use such programs is not advisable.

The iLCD Manager XE uses several sequences allowing you to enter any hex bytes or words very easily. If you need to lookup any of the command sequences, simply press the little arrow in the lower right corner of the "Documentation" group to display a list of these control sequences.

Seq Hex-Value Description
\i AA Command Introducer (0xAA)
\... 00 ... FF Decimal Byte (e.g. \123 or \-123)
\d... 00 ... FF Decimal Byte (e.g. \d123 or \d-123)
\D... 0000 ... FFFF Decimal Word (e.g. \D12345 or \D-1)
\L... 0000 0000 ... FFFF FFFF Decimal Long (e.g. \L1234567890)
\x... 00 ... FF Hex Byte (e.g. \x7B)
\X... 0000 ... FFFF Hex Word (e.g. \XAB12)
\#... 00000 ... FFFFF 24-Bit Color Value (e.g. \#00FF00 or \#CECECE)
\f FFFF MicroSD Path and Filename String Introducer (e.g. \f/DIR/FILE.EXT\0)
\m FFFE Graphic/Font/Macro/Message Name String Introducer (e.g. \mNAME\0)
\{...} - Comment, characters between '{' and '}' are not sent
\0 00 NULL Character (NUL)
\e 1B Escape Character (ESC)
\b 08 Back-Space Character (BS)
\n 0A Line Feed (LF)
\r 0D Carriage Return (CR)
\s 20 Space Character (SP)
\t 09 Tabulator Character (HS)

When reading the response from the left-hand side of the docking panel "Response from iLCD" in iLCD Manager XE, keep in mind that some hex values are interpreted and will be outputted differently. The actual value for the according byte can still be seen in the "Hex" part of this panel.

Seq Hex-Value Description
[ACK] 06 Acknowledge (command successfully processed)
[NACK] 15 Not acknowledge (command failed)
[BLACK] 04 Bootloader acknowledge (for internal use)
[EERR] 10 EEPROM write error (see Write EEPROM)
[CSERR] 17 Checksum Error (when writing flash or EEPROM)
[OVR] 19 Input buffer overflow (on serial port, SPI or I²C)
[XON] 11 Input buffer high water (see Set XON/XOFF for Terminal Mode)
[XOFF] 13 Input buffer low water (see Set XON/XOFF for Terminal Mode)

Example

When entering the following text in iLCD Manager XE:

\i!                 { Reset All }
\iCK\D100\D50       { Set Cursor Position to decimal x = 100, y = 50 }
\iDTHello World!\0  { Write Text "Hello World!" at x = 100, y = 50 }

and pressing the "Send" button, the following Hex characters are sent:

Hex Bytes Representation
AA 21 .!
AA 43 4B 00 64 00 32 .CK.d.2
AA 44 54 48 65 6C 6C 6F 20 57 6F 72 6C 64 21 00 .DTHello World!.

The hex output to be sent can also be monitored in iLCD Manager XE by clicking on the "Hex" button.

Please note that if you send the decimal word value \D170 as a parameter in a command from any controlling application instead of iLCD Manager XE, this will cause the current command sequence to be terminated. This is because the least significant byte of\D170 represents 0xAA and the controller will interpret it as such. The controller will then interpret the following bytes as the beginning of a new command with unexpected results. To prevent this, the value has to be ‘quoted’ by sending it twice. iLCD Manager XE adds these quoting characters automatically, refer to the Hex representation for verification.

So, for example, when setting the cursor to x = 170, y = 50, following sequence has to be sent: AA (\i) 43 (C) 4B (K) 00 AA AA (\D170) 00 32 (\D50)

The 0xAA character is quoted in this way to tell the iLCD Controller not to start with a new command sequence but to use the AA character as a parameter instead (also refer to chapter Command Structure).