Firmware-75 Command-020

From I-CubeX Wiki
Jump to: navigation, search

TABLE ENTRY (20, 14h)

The TABLE ENTRY command stores a lookup table entry in non-volatile memory. The command can be used in both host and stand-alone modes of operation. Upon completion of the TABLE ENTRY command the USB-microDig sends out the same message. This command is not available for digitizers with hardware v7.0 or lower.

The [BODY] of the TABLE ENTRY command:

000nnnnn: nnnnn = [0..31]; table number
00000ddd: ddd = [0..7]; table entry index MSB
0ddddddd: ddddddd = [0..127]; table entry index LSB
00000eee: eee = [0..7]; table entry value MSB
0eeeeeee: eeeeeee = [0..127]; table entry value LSB

Example:

To store value 312 as entry 256 in table 8, ie. to convert sensor value 256 into 312, send the following message:

240, 125, 0 {DEV}, 21 {TABLE ENTRY}, 8 {table number}, 2 {entry index MSB}, 0 {entry index LSB}, 2 {entry value MSB}, 56 {entry value LSB}, 247 (F0h, 7Dh, 00h, 15h, 08h, 02h, 00h, 02h, 38h, F7h)