An150 – Cirrus Logic AN150 User Manual
Page 9

AN150
AN150REV2
9
noise-free resolution (for the -BS versions of the
parts) over this input range, even in the presence of
large offset voltages.
What is “digital gain scaling” and how is it
useful?
The term “digital gain scaling” is used to describe
the way that the gain register in these converters
can be manipulated to digitally scale a smaller in-
put voltage over the entire output code range of the
ADC. Recall that the gain register can be varied
from 0 to 64 - 2
-24
, but should not exceed 40 (dec-
imal. Because the gain register can be manually
written and read, this function may be done within
the system software. In addition, the gain register
provides a very accurate means of changing the in-
put span of the ADC without having to perform a
new calibration. For example, the gain register can
be read from the part, shifted left by 1 bit and writ-
ten back into the part. This will have the effect of
doubling the converter’s gain without introducing
any gain error, as changing the amplifier gain set-
ting in the part would. Non-binary gain changes
can also be implemented using this type of gain
register manipulation. This allows for virtually any
input voltage span between 5 mV and 2.5 V, using
a combination of amplifier gain settings and gain
register manipulation.
What are some different approaches to using
calibration in my system?
Calibration can be done at the manufacturing and
testing stage, or in the field. A calibration step done
at the manufacturing or testing stage is generally
referred to as a factory calibration, and is normally
performed only once. A field calibration on the oth-
er hand, may be done at any time when the system
is in operation, either automatically or initiated by
the user. Some systems may only use one type of
calibration, where other systems may use a combi-
nation of both field and factory calibration. The ad-
vantage of a factory calibration is that it can usually
be performed with more precise equipment, and
user error is not a problem. Field calibration has ad-
vantages also, since it can take into account the ac-
tual environment where the system will be
operating, and may be desirable or even necessary
for some systems.
The easiest way to implement a factory calibration
is to write the system software so that it has two op-
erating modes: “calibration mode” and “user
mode”. The normal operation mode when power-
ing on the system should be the user mode. In this
mode, the system should perform all the functions
relative to the end user. The calibration mode can
be entered with a hardware jumper setting, a soft-
ware switch, or any number of other options, but it
should not be a normal function for the user. In cal-
ibration mode, the system can perform any neces-
sary calibration and configuration tasks, and store
the results to some form of on-board, non-volatile
memory. An example of this is to use the on-chip
system calibration functions to perform offset and
gain calibration, and then read the calibration re-
sults from the ADC and store them to EEPROM. In
user mode, the system would then read the registers
out of EEPROM and write the values into the
ADC’s registers on power-up to be used for normal
operation.
I need to be able to do a field calibration peri-
odically on a weigh scale using calibration
weights. Are the internal calibration registers
useful for this type of calibration?
The internal calibration registers can be very useful
in this type of calibration, though this may not be
obvious at first. The usual method of calibrating a
scale with calibration weights is to first zero-out the
scale with nothing on the platform, and then adjust
the output of the scale to the correct reading once a
calibration weight has been placed on the platform.
If the on-chip gain register is going to be used to ad-
just the scale’s output, the zero-point of the scale
should first be calibrated by setting the gain register