Firmware-72 Command-002

From I-CubeX Wiki
Jump to: navigation, search

RES (2, 02h)

In host mode, each sensor input can either be sampled with 10-bit (hi-res) or 7-bit (lo -res) resolution. After a RESET, the resolution for each input is set to lo-res (in host mode). Upon completion of the command the USB-microDig sends out the same command. In stand-alone mode this command is only useful when sending the SAMPLE command because in stand-alone mode sensor inputs are always sampled with 10-bit resolution.

The RES command’s [BODY] is formatted the same as the STREAM command (the command ID is the only difference):

0x000yyy: x = 1; hi-res (10-bit mode)
x = 0; lo-res (7-bit mode)
yyy = [0..7]; sensor input number, where the first sensor input number = 0, and the last (8th) sensor input number = 7

Example:

In order to turn the 2nd sensor input to hi-res mode, the following message is sent:

240, 125, 0 {DEV}, 2 {RES}, 65 {x = 1, yyy = 1}, 247 (F0h, 7Dh, 00h, 02h, 41h, F7h)

In order to turn the same sensor input to lo-res mode, the following message is sent:

240, 125, 0 {DEV}, 2 {RES}, 1 {x = 0, yyy = 1}, 247 (F0h, 7Dh, 00h, 02h, 01h, F7h)