3 offset calibration, Offset calibration, Cs5376a – Cirrus Logic CS5376A User Manual

Page 60

Advertising
background image

CS5376A

60

DS612F4

value in the OFFSETx registers (0x25-0x28) from
the digital filter output data word.

Offset correction values are 24-bit two’s comple-
ment with a maximum positive value of 0x7FFFFF,
and a maximum negative value of 0x800000. If ap-
plying an offset correction causes the final result to
exceed a 24-bit two’s complement maximum, the
output data will saturate to that maximum value.

Output Data = Input Data - Offset Correction

Max Positive Output Value = 0x7FFFFF

Max Negative Output Value = 0x800000

Once the OFFSET registers are written, the USE-
OR bit in the FILTCFG register enables offset cor-
rection.

15.3 Offset Calibration

An offset calibration algorithm in the CS5376A
can automatically calculate offset correction val-
ues. When using the offset calibration algorithm,
background noise data should be used as the basis
for calculating the offset value of each measure-
ment channel.

The offset calibration algorithm is an exponential
averaging function that places increased weight on

more recent digital filter data. The exponential
weighting factor is set by the EXP bits in the
FILTCFG register, with larger exponent values
producing a smoother averaging function that re-
quires a longer settling time, and smaller values
producing a noisier averaging function that re-
quires a shorter settling time. Typical exponential
values range from 0x05 to 0x0F, depending on the
available settling time.

The characteristic equations of the offset calibra-
tion algorithm include an input value, X, an output
value, Y, a summation value, YSUM, a sample in-
dex, n, and an exponential value, EXP.

Y(n) = X(n) - [YSUM(n-1) >> EXP]

YSUM(n) = Y(n) + YSUM(n-1)

Offset Correction = YSUM >> EXP

Once the EXP bits are written, the ORCAL bit in
the FILTCFG register is set to enable offset calibra-
tion. When enabled, updated offset correction val-
ues are automatically written to the OFFSETx
registers. When the offset calibration algorithm is
fully settled, the ORCAL bit is cleared to maintain
the final values in the OFFSETx registers.

Advertising