An150 – Cirrus Logic AN150 User Manual
Page 10

AN150
10
AN150REV2
to 1.0 and performing a system offset calibration,
or adjusting the offset register until the scale reads
zero. Following this, the gain register can be adjust-
ed to obtain the correct reading for the calibration
weight. One way of doing this is to set the gain reg-
ister to a value that will give approximately the cor-
rect reading from the scale, and perform a
conversion (or multiple conversions) to get a dis-
play output from the scale. The gain register can
then be read from the part, and a value can be added
or subtracted based on user input to adjust the gain
register up or down. Once the gain has been adjust-
ed and written back into the ADC, another conver-
sion (or multiple conversions) can be performed to
get a new display output from the scale. This pro-
cess can be repeated until the display output match-
es the desired value. In a more complex system,
this process may even be automated such that the
user enters the magnitude of the calibration weight,
and the system adjusts the gain register and takes
readings until the value from the scale reads the
same as the desired calibration value.
How are the OG1-OG0 bits in the Channel
Setup Registers used?
The OG1-OG0 bits in the Channel Setup Registers
allow the system to select from any of the offset
and gain registers available in the device when per-
forming conversions on a specific channel. Nor-
mally, the offset and gain registers associated with
the currently selected physical channel (as speci-
fied by CS1-CS0 in the Setup) are used when per-
forming conversions. To tell the ADC that the
OG1-OG0 bits are to be used instead, a ‘1’ must be
written to the Configuration Register’s OGS bit (bit
20). Then, the offset and gain registers for the chan-
nel specified by the OG1-OG0 bits will be used,
while the conversion is still performed on the chan-
nel specified by CS1-CS0. This allows a system to
quickly access different gain and offset register set-
tings for conversions on the same physical channel,
without having to write those registers into the de-
vice every time. When the OGS bit in the Configu-
ration Register is equal to ‘0’, the CS1-CS0 bits in
the Setup are used to select the offset and gain reg-
isters that will be accessed.
What is the difference between single and
continuous conversion mode?
The most noticeable differences between these two
modes are the speed at which conversions can be
performed, and whether the converter will begin a
new conversion when the current one is finished. In
continuous conversion mode, every conversion is
output from the ADC, and the converter will con-
tinue to perform conversions until it is halted by the
system microcontroller. This includes any un-set-
tled outputs from the sinc
3
or sinc
5
filter. Data is
converted and output from the part at the output
word rate specified by the selected Setup. Continu-
ous conversion mode is most useful when perform-
ing conversions on a single channel for extended
periods of time. The very first output word of a con-
tinuous conversion cycle takes longer than subse-
quent conversions, due to some internal
synchronization of the converter.
The single conversion mode is different in that the
digital filter processes the modulator bitstream un-
til it can compute a fully-settled result to output a
data word. A conversion in single conversion mode
therefore lasts longer than one performed in contin-
uous conversion mode. In addition, when a single
conversion is finished, the part will not perform an-
other conversion until a new conversion command
is initiated. Single conversion mode is most useful
when repeatedly performing conversions on more
than one channel of the part, or when using an ex-
ternal multiplexer.
Note that the time to arrive at a fully-settled output
from the part in continuous conversion mode is the
same amount of time that a single conversion takes.