5 calibration and compensation procedures, An366 – Cirrus Logic AN366 User Manual
Page 12

AN366
12
AN366REV2
5 Calibration and Compensation Procedures
A CS5480/84/90 power meter normally has two modes of operation: calibration, which is executed only once at the
factory, and normal operation in the field.
Calibration will compensate for system-level errors and is only performed at the factory. Normal operation is a
continuous running mode (continuous conversion mode) or user-initiated, single execution mode (single conversion
mode). Most designs are continuously running and use the continuous conversion command. Normal operation is
resetting the device, loading calibration and configuration information from non-volatile memory, and executing
continuous conversion command. The MCU then needs to read various device registers to obtain the power, current,
and voltage. As these registers are updated, the MCU will need to post the information to the user interface. This is
accomplished by using DO pin interrupts or by periodically reading the status register. The default configuration of
the part sets most of the registers to a common configuration. When continuous conversion is performed, the device
will provide most register updates once per second (default at reset).
The normal field operation is simple and there is no need for extensive computation by the MCU. A simple, low cost
MCU may be used to assist the normal operation.
5.1 Normal Operation Procedure (Performed at Every Reset in the Field)
The following procedure outlines the steps required to put the meter in normal operation mode. Figure 7 shows
a simplified flow chart for the normal operation in the field.
1. Reset the CS5480/84/90.
2. Restore configuration and control registers.
3. Restore the V
GAIN
and I
GAIN
registers from the non-volatile memory (NVM).
4. If needed, restore the offset registers from NVM.
5. If needed, restore the phase compensation registers from the NVM.
6. If needed, restore the no load compensation to the P
OFF
and Q
OFF
registers from the NVM.
7. Send the single conversion command to the CS5480/84/90.
8. Confirm that the register checksum is valid, or return to step 1.
9. Send the continuous conversion command to the CS5480/84/90.
10. Enable and clear DRDY.
11. Poll DRDY.
12. If DRDY is set, clear DRDY.
13. Read I
RMS
, V
RMS
, and P
AVG
. Scale the I
RMS
, V
RMS
, and P
AVG
back into true value by:
Amps = Full_Scale_Current
(I
RMS
/0.6)
Volts = Full_Scale_Voltage
(V
RMS
/0.6)
Watts = Full_Scale_Power
(P
AVG
/0.36)
14. Loop back to "Poll DRDY" step.