Table 1—There are several UART command codes. The protocol is extremely simple: a single letter followed by an integer number. We’ve included the accepted command codes and the valid ranges for their parameters.

 

Command Range Description
C –31 ÷ 31 Sets the voltage of DAC CurSet that determines the current. Only positive values are used for measurements. The full range of values can be used to measure the actual current generated in Pause mode with a resistor connected instead of Cx.
L 0 ÷ 15 Sets the threshold voltage of CmpLow
H 0 ÷ 15 Sets the threshold voltage of CmpHigh
R > 0 Sets the resistance of Rset in milliohms
M [> 0 ] Prints a number of readings. If no parameter is specified, a single measurement is printed. The average, charge, and discharge measurements are shown.
P Pause/Resume measurement process
D > 0 Sets VDD in millivolts. Performs a calibration procedure to set V­REF.
V 0, 1, or 2

Sets the mode of operation of the LED.
0: LED is off
1: Green   VCx < VLow
Red VCx > VHIGH
2: Green charging
    Yellow  initial discharging
    Red  discharging