Using the Sensing Machine

Application Note AN8000.05
ZoomingADC™
AN8000.05
Application Note
Using the Sensing Machine,
Setting the ZoomingADC™ Parameters,
a sample application.
Rev 1 February 2006
www.semtech.com
1
Application Note AN8000.05
ZoomingADC™
Table of Contents
1
1.1
1.2
1.3
2
2.1
2.2
2.3
2.4
2.5
2.6
2.7
3
3.1
3.2
3.3
3.4
3.5
4
4.1
4.2
4.3
4.4
5
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5.9
6
6.1
6.2
INTRODUCTION .......................................................................................................................................... 3
This document .............................................................................................................................................. 3
The Sensing Machine and the ZoomingADC............................................................................................... 3
Notation ........................................................................................................................................................ 5
THE ADC...................................................................................................................................................... 6
Introduction................................................................................................................................................... 7
Selecting the input channel .......................................................................................................................... 7
Selecting the reference channel................................................................................................................... 8
Output format................................................................................................................................................ 9
Setting the resolution of the ADC ............................................................................................................... 10
Time required to realize a conversion ........................................................................................................ 10
Lowering noise and eliminating acquisition chain offset ............................................................................ 11
THE ZOOM................................................................................................................................................. 13
Introduction................................................................................................................................................. 14
Using PGA3................................................................................................................................................ 14
Using PGA1 and PGA2 .............................................................................................................................. 17
Choosing the right parameters for PGA1, PGA2 and PGA3...................................................................... 17
PGA settling time........................................................................................................................................ 19
ADVANCED CONCEPTS .......................................................................................................................... 20
Introduction................................................................................................................................................. 21
The ZoomingADC impedance .................................................................................................................... 21
Reducing the current of the ADC and of the PGAs.................................................................................... 22
Ratiometric measurements ........................................................................................................................ 22
CALLING THE ZOOMINGADC IN AN XE8000 APPLICATION............................................................... 23
Introduction................................................................................................................................................. 24
Installing the sample application ................................................................................................................ 24
ZoomingADC sample application principle. ............................................................................................... 24
Settings for the sample application ............................................................................................................ 25
Initialization................................................................................................................................................. 26
ZoomingADC initialization .......................................................................................................................... 26
ZoomingADC routines ................................................................................................................................ 27
Uart routines ............................................................................................................................................... 28
Complete sample application, main code .................................................................................................. 29
APPENDIX ................................................................................................................................................. 30
Operating the Sensing Machine on the ProStart at different voltages ....................................................... 31
Hex - Dec - Bin table .................................................................................................................................. 32
© Semtech 2006
www.semtech.com
2
Application Note AN8000.05
ZoomingADC™
1
INTRODUCTION
In this chapter you will find:
What is in this document and where it is
What you are supposed to have read to fully profit from this document
Where you will find additional information
This document is a guide to a successful start with the XE8000 Sensing Machines. It goes through the main
aspects of the most specific peripherals and shows a short sample application.
The reader is expected to have some understanding of C-programming and to have read the SEMTECH technical
note TN8000.16 "Coding with RIDE quick start" to fully exploit the sample application. The sample application also
supposes that the reader has access to a ProStart for one of the Sensing Machines (we suggest the ProStart set
made of the XE8000SW, the XE8000MP and the XE8000EV101) and a PC with a serial port and a terminal
application.
Detailed product description and performances can be found in the corresponding datasheets. This document does
not replace the datasheets and includes only partial information with the sole purpose of teaching "how it works
and how it can be used".
An Excel spreadsheet is also available for download on the Semtech web site, along with the sample application
that puts together all the parameters of the ZoomingADC and helps the user to determine the very best settings for
his application.
The rest of this document is in 4 parts: "The ADC", "The Zoom", "Advanced concepts" and "Calling the
ZoomingADC in an XE8000 application".
The sample application will be briefly explained below so that the reader can use it to test his own understanding
during the first chapters. It is explained again, in greater detail, in the last chapter.
1.1
THE SENSING MACHINE AND THE ZOOMINGADC
The Sensing Machine is a system on chip (SoC) designed for sensor interfacing. Its main functional block is the
ZoomingADC™ (see below). The Sensing Machine also embeds a comprehensive set of functional blocks to
manage the complete acquisition process. This includes clock generators, a MCU core, non-volatile program
memory, volatile data memory and communication peripherals.
The XE8802 Sensing Machine with LCD driver.
© Semtech 2006
www.semtech.com
3
Application Note AN8000.05
ZoomingADC™
The ZoomingADC is built to enable the acquisition of several different signals. It is highly versatile, and its usage
can be complex. Nevertheless some basics are quite simple and this document will help the user to get off to an
easy start with the ZoomingADC.
input
Zoom
ref
ADC
Output
code
The complete ZoomingADC™, with the input and reference selection, the Zoom (PGAs) and the ADC.
The ADC is the analog to digital converter itself, and it can be used without the Zoom for sufficiently large signals.
The resolution of the ADC can be programmed. Using the ADC alone considerably simplifies the control of the
block. The input and reference selection is described in the ADC chapter.
The Zoom is an extension to the ADC to make the acquisition of small signals, like the ones generated by
Wheatstone bridges of piezoresistive sensors or magnetic sensors. The Zoom can also add or subtract a
controlled offset from the input signal to accommodate sensors with large offsets. We suggest the reader first gets
used to the ADC alone, and then studies the Zoom if required.
The last chapter will show and explain a very short XE8000 sample application that calls the ZoomingADC to make
an acquisition and transfers the result to the UART port. It makes it possible to very easily test all features
explained below, one by one, and see the result on a PC using a terminal. This application is not optimized for
speed, power consumption or code size.
To exercise all information given below in the sample application, one just has to update the ZoomingADC settings
(function InitADC) as shown in the following listing. The rest of the sample application will do the acquisition
according to these settings and push the result to the UART.
© Semtech 2006
www.semtech.com
4
Application Note AN8000.05
ZoomingADC™
/*******************************************************************
** -------------------General Parameters--------------------------**
** Default
: 0x00 - 0x01
g1
[1 reset to default
] **
** Freq
: 0x00 - 0x03
g2
[1/4, 1/8, 1/32*RC, 8kHz] **
** Nelconv
: 0x00 - 0x03
g3
[1, 2, 4, 8 conversions ] **
** OSR
: 0x00 - 0x07
g4
[8,16,32,...,1024
OSR ] **
** Cont
: 0x00 - 0x01
g5
[continued,discontinued ] **
** Enable
: 0x00 - 0x0F
g6
[Pga3, Pga2, Pga1, Adc ] **
** ---------------------Pga parameters--------------------------- **
** Pga1Gain
: 0x00 - 0x01
p1
[1, 10
] **
** Pga2Gain
: 0x00 - 0x03
p2
[1, 2, 5, 10
] **
** Pga3Gain
: 0x00 - 0x7F
p3
[0.083, ..., 10
] **
** Pga2Off
: 0x00 - 0x0F
p4
[-1, -0.8, ..., 1
] **
** Pga3Off
: 0x00 - 0x7F
p5
[-5.25,-5.16,...,5.25
] **
** BiasAdc
: 0x00 - 0x03
p6
[25, 50 ,75 100% *Inom ] **
** BiasPga
: 0x00 - 0x03
p7
[25, 50 ,75 100% *Inom ] **
**----------------------Mux parameters----------------------------**
** AMuxMode : 0x00 - 0x01
m1
[differential, common ] **
** AMuxSign : 0x00 - 0x01
m2
[normal, inverted
] **
** AMuxChan : 0x00 - 0x07
m3
[channel selection 1-8 ] **
** VMuxChan : 0x00 - 0x01
m4
[R1-R0, R3-R2
] **
*******************************************************************/
//
InitAdc parameters:
//
g1
g2
g3
g4
g5
g6
//
p1
p2
p3
p4
p5
p6
p7
//
m1
m2
m3
m4
InitAdc(0x00, 0x00, 0x00, 0x07, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
The default UART settings in the sample application are: 38400 kbaud, 8 bits, 1 stop, no parity check. The default
RC clock is 1.23 MHz (it is set in the UartInit() function).
1.2 NOTATION
Numbers will be written like in C language: 0x0A is a hexadecimal number, 10 is a decimal number. The following
notation "0b00001010" will be used for binary numbers.
© Semtech 2006
www.semtech.com
5
Application Note AN8000.05
ZoomingADC™
2
THE ADC
In this chapter, you will find:
¾ What the analog to digital converter (ADC) is
¾ How to select the right signal input and the right reference input
¾ How to select the resolution
¾ How much time will the conversion take
© Semtech 2006
www.semtech.com
6
Application Note AN8000.05
ZoomingADC™
2.1
INTRODUCTION
The analog to digital converter (ADC) takes an input signal, compares it to a reference and issues a code
proportional to the ratio of the signal over the reference. The input signal and the reference are differential
voltages.
Vref+
Vin+
Vin-
+
+
Out
-
Vref-
Resolution
The analog to digital converter. It can be set for different resolutions and includes the low-pass filter.
In this converter, the output code is Out ≅
(Vin1 − Vin − )
(Vref +
− Vref − )
(normalized on ± 0.5).
One can program the ADC resolution between 6 and 16 bits. The resolution setting influences the acquisition time.
If the signal at the input of the ADC is bigger than the maximum value, or smaller than the minimum value, the
output code is saturated to the maximum or minimum value for the given resolution.
The signal at the input of the ADC and on the reference must be kept between the low supply voltage (VSS) and the
high supply voltage (Vbat).
2.2 SELECTING THE INPUT CHANNEL
The ZoomingADC has a multiplexer to select the input channel. The multiplexer has 8 input lines and 2 output
lines. The output lines of the input multiplexer are connected to the ADC (or to the preamplifiers when using the
Zoom). The two output lines of the input multiplexer carry the differential signal to the ADC.
The input lines can be selected in pairs or one by one. When a pair is selected, the two lines are connected to the
two output lines as a differential signal. When the lines are selected one by one, line AC_A(0) has a special
meaning and is always selected to be one line of the differential signal, the selected input being the other line of the
differential signal.
In addition the positive and negative inputs of the differential signal can be inverted for offset cancellation.
© Semtech 2006
www.semtech.com
7
Application Note AN8000.05
ZoomingADC™
Selection by pair
Selection one by one
AC_A(0)
AC_A(0)
AC_A(1)
AC_A(1)
AC_A(2)
AC_A(2)
AC_A(3)
AC_A(3)
AC_A(4)
AC_A(5)
AC_A(4)
AC_A(5)
AC_A(6)
AC_A(6)
AC_A(7)
AC_A(7)
Input channel selection, by pair or one by one
The input channel, the pair by pair or one by one selection mode as well as the differential signal inversion can be
selected by the bits AMUX of the ZoomingADC register RegAcCfg5. A complete selection table is available in the
datasheet. Default for the sample application is all AMUX bits to 0, which means AC_A(1) is the positive input Vin+
and AC_A(0) is the negative input Vin-.
Note:
Selection by pair and selection one by one can be mixed to detect different types of signal. For 3 single ended
signals and 2 differential signals, the single ended signals will be connected to AC_A(1), AC_A(2) and AC_A(3),
AC_A(0) will be used as potential reference for these 3 inputs, and the differential signals will be connected to
AC_A(5)-AC_A(4) and AC_A(7)-AC_A(6).
2.3
SELECTING THE REFERENCE CHANNEL
There are two differential reference channels for the ADC. They can be selected to measure two different sensors
with different references.
The voltage on the selected reference must be positive. Reducing the voltage on the reference increases the input
sensitivity.
Note:
The reference signal is used during the whole conversion. Any noise or variation of the reference input will
deteriorate the conversion precision. One must handle the reference input with the same care as the signal input to
have low noise, high resolution conversions.
The reference channel can be selected by the bit VMUX of the ZoomingADC register RegAcCfg5. A complete
table is available in the datasheet. Default for the sample application is VMUX set to 0, which means AC_R(1) is
the positive reference input Vref+ and AC_R(0) is the negative reference input Vref-.
© Semtech 2006
www.semtech.com
8
Application Note AN8000.05
ZoomingADC™
2.4
OUTPUT FORMAT
The output code is always a 16-bit signed number in complement to 2 (even when the resolution is smaller than 16
bits). When the conversion resolution is smaller than 16 bits, the bit following the LSB is always 1, and the next bits
are always 0. The code 0x0000 does not exist when the converter operates with less than 16 bits resolution.
Example: Different input values and the corresponding output codes for 3 resolutions
Vin+
Vin-
Vref+
0.5 V
0.5 V
0.0 V
0.5 V
comments
1V
0V
1V
0V
Vref-
0.5 V
1.0 V
1V
0V
0.0 V
0.5 V
1V
0V
*1 ZoomingADC settings are:
Out
(8 bits
conversion)
*1
0x7F80 (32640)
0x0080 (128) or
0x8F80 (-128)
0x8080 (-32640)
0x8080 (-32640)
Out
(12 bits
conversion)
*2
0x7FF8 (32760)
0x0008 (8) or
0x8FF8 (-8)
0x8008 (-32760)
0x8008 (-32760)
Out
(16 bits
conversion)
*3
0x7FFF (32767)
0x0000 (0) or
0x8FFF (-1)
0x8000 (-32768)
0x8000 (-32768)
InitAdc(0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*2 ZoomingADC settings are:
InitAdc(0x00, 0x00, 0x00, 0x03, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*3 ZoomingADC settings are:
InitAdc(0x00, 0x00, 0x00, 0x05, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
Notes:
The input 0 is at equal distance from the highest negative code and the lowest positive code (there is an even
number of steps, therefore no step is exactly equivalent to the input 0 and the error will always be ± 0.5 LSB).
If one could have a converter with a 2 bits output on a ±1 V range, this would mean that there would be 4 codes:
(10), (11), (00) and (01).
(10) for Vin < -0.5 V, (11) for -0.5 V < Vin < 0, (00) for 0 < Vin < +0.5 V and (01) for Vin > +0.5 V. For such an
converter, Vin = 0 V would be alternating between (11) and (00).
© Semtech 2006
www.semtech.com
9
Application Note AN8000.05
ZoomingADC™
2.5
SETTING THE RESOLUTION OF THE ADC
The ADC of the ZoomingADC is an oversampled converter. This means that it uses several input samples to
generate one output code (or output sample). The resolution that is achieved in the output code depends on the
number of input samples used to generate this output code. This resolution can be increased by realizing several
conversions per acquisition, this will be explained in a next chapter.
The number of input samples used to generate one output sample (also named "over-sampling ratio" or OSR), and
therefore the resolution, is defined by the ADC parameter SET_OSR in register RegAcCfg0.
OSR = 2 3 +SET _ OSR
Resolution ADC = min( 6 + 2 ⋅ SET _ OSR, 16 ) in bits
See example above for 8 bit, 12 bit and 16 bits resolution simple conversions.
2.6
TIME REQUIRED TO REALIZE A CONVERSION
A conversion is made of several input samples, sampled at a given frequency fs. Therefore the time required for
one conversion (Tcon) depends on fs and the number of input samples required to make the conversion, plus some
extra set-up time.
Note:
The total time required for a conversion may also depend on extra features like preamplification and number of
conversions per sample (see below)
fs is set by the bits FIN of RegAcCfg2. Default value for FIN is 0, which means that fs is the RC frequency divided
by 4 in the XE8801 and XE8805 or the RC frequency divided by 8 in the XE8802. Maximal fs in any case is 512
kHz.
Note:
To reach the maximum acquisition frequency on the XE8802, one can set the RC oscillator to 4 MHz, and divide
the CPU frequency by a factor of 2 (instruction FREQ).
All timings given here will be for fs = 512 kHz unless otherwise mentioned. The default fs in the sample application
when loaded on an XE8801 or an XE8805 is 300 kHz, it is 150 kHz when loaded on an XE8802.
Tcon = (OSR + 2) / fs for a conversion without amplification or multiple conversions per samples (bits SET_NELC
are 0).
© Semtech 2006
www.semtech.com
10
Application Note AN8000.05
ZoomingADC™
Example: Time required making different simple conversions
resolutio
Required OSR
n
8 bits
16
12 bits
64
16 bits
256
*1 ZoomingADC settings are:
SET_OS
R
0b001
0b011
0b101
Time at fs=512 kHz
35.2 µs
129 µs
504 µs
Comment
s
*1
*2
*3
InitAdc(0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*2 ZoomingADC settings are:
InitAdc(0x00, 0x00, 0x00, 0x03, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*3 ZoomingADC settings are:
InitAdc(0x00, 0x00, 0x00, 0x05, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
2.7
LOWERING NOISE AND ELIMINATING ACQUISITION CHAIN OFFSET BY INCREASING THE NUMBER
OF CONVERSIONS PER ACQUISITION
This is a more advanced concept that can improve the results of the normal conversion as described above. It is
the connection of several conversions (as described above) into one output sample (one acquisition). The
ZoomingADC is able to take several such conversions one after each other, inverting the input signal sign between
each of these samples. The acquisition result is the average of all conversions. This reduces offsets from the
acquisition path and further filters the input signal.
This multiple conversion and filtering process also increases the resolution of the acquisition, and increases the
time required for a complete acquisition.
The number of conversions per acquisition (NELCONV) is set by the bits SET_NELC is the register RegAcCfg0.
Default value is 0 for this document (one conversion per acquisition).
NELCONV = 2 SET _ NELC
The achieved resolution is now
Resolution ADC = min( 6 + 2 ⋅ SET _ OSR + SET _ NELC, 16) in bits.
The time required for an acquisition is now
Tcon = (NELCONV (OSR + 1) + 1) / fs
Note:
Increasing NELCONV does not increase the resolution as fast as increasing OSR.
NELCONV is combined with a first order filter that can be helpful to reduce the sensor noise and the input noise.
Using NELCONV=2 or above rejects most of the acquisition path offset and offset drift.
© Semtech 2006
www.semtech.com
11
Application Note AN8000.05
ZoomingADC™
Example: Time required making acquisitions with multiple conversion compared with acquisitions
with a single conversion. Sample application has a 300 kHz fs. Maximal fs is 512 kHz.
resolution
Required
SET_OS
OSR &
R
NELCON
V
12 bits
64 & 1
0b011
13 bits
64 & 2
0b011
14 bits
64 & 4
0b011
14 bits
128 & 1
0b100
*1 ZoomingADC settings are:
SET_NELC
Offset
cancel
Time at
fs = 300
kHz
Time at
fs = 512
kHz
Notes
0b00
0b01
0b10
0b00
No
Yes
Yes
No
220 µs
437 µs
870 µs
433 µs
129 µs
256 µs
510 µs
254 µs
*1
*2
*3
*4
InitAdc(0x00, 0x00, 0x00, 0x03, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*2 ZoomingADC settings are:
InitAdc(0x00, 0x00, 0x01, 0x03, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*3 ZoomingADC settings are:
InitAdc(0x00, 0x00, 0x02, 0x03, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*4 ZoomingADC settings are:
InitAdc(0x00, 0x00, 0x00, 0x04, 0x00, 0x01,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
© Semtech 2006
www.semtech.com
12
Application Note AN8000.05
ZoomingADC™
3
THE ZOOM
In this chapter, you will find:
What the Zoom function of the ZoomingADC is
How to select the gain and the offset of each PGA
How much time it will add to the conversion
© Semtech 2006
www.semtech.com
13
Application Note AN8000.05
ZoomingADC™
3.1
INTRODUCTION
The Zoom is a series of 3 PGAs, one with one programmable differential input, and two with two programmable
differential inputs. When a PGA is not used, it is by-passed.
input
Zoom
ADC
PGA1
PGA3
ref
PGA2
Output
code
The three PGAs that form the Zoom.
The PGA2 and PGA3 have two gain settings. The gain of the PGA on its input that is connected to the previous
PGA or to the input selector is named Pga(i)Gain and it is used to set the gain of the acquisition path. The gain of
the PGA on its input that is connected to the reference selector is named Pga(i)Offset and it is used to add a
controlled offset to the signal path. A PGA that is not used can be by-passed, adding no noise or current
requirement to the system. If only one PGA is used, it should be PGA3 that is the most versatile and has the
highest linearity. Therefore the explanations below will start with PGA3.
3.2
USING PGA3
PGA 3 can be set for gains between 1/12 and 10. The output of PGA3 is directly connected to the input of the
ADC.
Note:
As the output of the PGA3 is directly connected to the input of the ADC, its signal range must pass in the input
range of the ADC, that is roughly ±0.5 x Vref.
The gain of the PGA3 is set by the 7 bits Pga3Gain of register RegAcCfg3. The gain is proportional to the value of
the register, the LSB value being 1/12. PGA3 has a gain of 1 for Pga3Gain = 12 = 0x0C.
Note:
Input signal and reference signal are differential. All gains and signal values are differences of potentials and the
input signal can be positive or negative.
© Semtech 2006
www.semtech.com
14
Application Note AN8000.05
ZoomingADC™
Example: Gain setting for the PGA3, no offset compensation.
AC_A(1)
AC_A(0)
AC_R(1)
AC_R(0)
Pga3
range
range
Gain
0.0 V to
0.5 V
1.0 V
0.0 V
1
1.0 V
0.0 V to
0.0 V
1.0 V
0.0 V
1
0.5 V
0.0 V to
0.0 V
1.0 V
0.0 V
0.5
1.0 V
0.0 V to
0.0 V to
1.0 V
0.0 V
0.5
1.0 V
1.0 V
*1 ZoomingADC settings are (PGA3 gain in bold):
PGA3
out range
- 0.5 V to
+ 0.5 V
0.0 V to
+ 0.5 V
0.0 V to
+ 0.5 V
- 0.5 V to
+ 0.5 V
ADC
code range
0x8000
0x7FFF
0x0000
0x7FFF
0x0000
0x7FFF
0x8000
0x7FFF
*1
*1,*3
*2,*3
*2
InitAdc(0x00, 0x00, 0x00, 0x07, 0x00, 0x09,
0x00, 0x00, 0x0C, 0x00, 0x00, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*2 ZoomingADC settings are (PGA3 gain in bold):
InitAdc(0x00, 0x00, 0x00, 0x07, 0x00, 0x09,
0x00, 0x00, 0x06, 0x00, 0x00, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*3 ADC input range is not completely used !
As can be seen from the above example, for some input ranges, it is not possible to use the full input range of the
ADC using only gain settings because some values are never reached. This could be compensated for by
changing the potential offset of the input signal, but this may require external elements. The ZoomingADC has
another mechanism included to compensate for offsets of the input signal: this is the offset input of the PGAs. This
is a second programmable input that is connected to the reference voltage. This input can be programmed in gain
and sign, so that an offset can be added to or subtracted from the input signal.
The offset amplifier of PGA3 is controlled by the 7 bits Pga3Off of register RegAcCfg4. These bits multiply Vref/12
and subtract it from the amplified input signal. Offset setting can be positive or negative.
© Semtech 2006
www.semtech.com
15
Application Note AN8000.05
ZoomingADC™
Example: Gain setting for the PGA3, with offset compensation.
AC_A(1)
range
0.0 V to
0.5 V
0.0 V to
1.0 V
AC_A(0)
range
0.0 V
AC_R(1)
AC_R(0)
Pga3
Gain
2
Pga3
Offset
+0.5
PGA3
out range
1.0 V
0.0 V
-0.5 V to
(=24/12)
(=6/12)
+0.5 V
0.0 V
1.0 V
0.0 V
1
+0.5
-0.5 V to
(=12/12)
(=6/12)
+0.5 V
*1 ZoomingADC settings are (PGA3 gain and offset in bold):
ADC
code range
0x8000
0x7FFF
0x8000
0x7FFF
*1
*2
InitAdc(0x00, 0x00, 0x00, 0x07, 0x00, 0x09,
0x00, 0x00, 0x18, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
*2 ZoomingADC settings are (PGA3 gain and offset in bold): :
InitAdc(0x00, 0x00, 0x00, 0x07, 0x00, 0x09,
0x00, 0x00, 0x0C, 0x00, 0x06, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
Note:
The output range of the PGA3 must fit within the input range of the ADC. But the individual outputs of the gain or
offset amplifiers of the PGA3 do not need to be within a given range as they do not really physically exist.
© Semtech 2006
www.semtech.com
16
Application Note AN8000.05
ZoomingADC™
3.3
USING PGA1 AND PGA2
If the gain obtained by the PGA3 is not sufficient to have an input signal that covers the full input range of the ADC,
one can increase it further by using PGA2 (gain 1, 2, 5 or 10) and/or PGA1 (gain 1 or 10). The output of an
amplifier is quite easy to compute (all voltages are differential, Vin and Vout can be positive or negative, Vref is
positive):
Vout(PGA1) = Vin(PGA1) * Pga1Gain
Vout(PGA2) = Vin(PGA2) * Pga2Gain - Vref * Pga2Offset
Vout(PGA3) = Vin(PGA3) * Pga3Gain - Vref * Pga3Offset
Notes:
The (differential) output range of any PGA must fit within ± Vbat. Output range of PGA1 should be within ±Vbat/5
and output range of PGA2 should be within ±Vbat/2 otherwise linearity will be strongly degraded. The (differential)
output range of PGA3 must fit within ± Vref/2. Otherwise part of the signal will saturate the ADC.
For a good linearity, a maximal gain must be applied to the last amplification stages, reducing the output amplitude
of the first gain stages.
3.4
CHOOSING THE RIGHT PARAMETERS FOR PGA1, PGA2 AND PGA3
There are a few rules to set the correct Zoom parameters. The goal is to map the input signal range on the full
input range of the ADC, so that a maximum of its resolution can be exploited.
1) Put the gain at the end of the amplification chain.
2) Check the output voltage range of each PGA for absolute min-max of the input signal. If PGA2 saturates and
PGA3 gain is low, saturation will occur below the min-max values of the ADC!
3) Check the output voltage of PGA3 versus the input range of the ADC for absolute min-max of the input signal
and of the reference signal.
4) Keep some margin for the absolute precision of the parameters (15% if not offset cancellation, 25% if offset
cancellation).
5) Keep some margin for the temperature drift (depends on temperature range and on its effect on the input signal
and on the reference).
6) If the output of the ADC does not cover the full 0x8000 to 0x7FFF as planned (deduction made of the margins),
check again points 2 and 3.
7) If linearity seems to be a problem, check again point 1, or check the input signal's impedance.
8) For noise improvements, one can check the reference stability and increase OSR and NELCONV.
© Semtech 2006
www.semtech.com
17
Application Note AN8000.05
ZoomingADC™
Example: PGAs settings for a pressure sensor.
Sensing
Machine
AC_R(1) = Vreg
Vbat
Vb+
Vs+
Sensor
Vs-
AC_A(1)
Rx
AC_A(0)
Tx
VbAC_R(0) = Vss
Vss
The whole system is supplied between Vbat and Vss. It communicates via the UART on lines Tx and Rx.
The pressure sensor is directly connected to the Sensing Machine. In this case, it is supplied by the Vreg
voltage (see Advanced Concept chapter for more information on this trick). The capacitor on Vreg is the
necessary capacitor of the voltage regulator (1 µF). Vreg may vary from chip to chip and with temperature, for
this example we assume Vreg = 2.1 V.
The sensor is biased by the voltage between Vb+ and Vb-. Its signal is read between Vs+ and Vs-.
The sensor has the following characteristics:
Sensitivity = 15 mV/V /bar (or, under 2.1 V bias, 0 V at 0 bar, 0.015 * 2.1 = 31.5 mV at 1 bar)
We will compute the PGAs settings for two types of sensors: one absolute going from vacuum to 1.2 bar, and
the other barometric going from 0.8 to 1.2 bar, maximal gain being on the last PGA (0 mean PGA is disabled).
Gain is set to maximum without saturation (signal amplitude at the input of the ADC within ±Vref/2).
Type
Minimal input
Maximal input
Input
range
Gain
Gain
- 25%
Gain settings
PGA1, PGA2, PGA3
Absolute
0 mV/V
18 mV/V
18 mV/V
55.5
41.6
0, 5, 8.3 = 41.5 ->
0b0, 0b10, 100
Barometric
12 mV/V
18 mV/V
6 mV/V
167
125
10, 2, 6.2 = 124 ->
0b1, 0b01, 74
We will now compute the offset cancellation values (keep the mean output of each amplifier as near to 0 as
possible).
PGA3
PGA3
Type
PGA1
PGA2
PGA2
PGA2
PGA3
gain output Offset
mean
mean
gain
Offset
mean
Setting
input
input
output
Setting
input
Absolute
disabled
9 mV/V
45 mV/V
0 V/V
-> 0b000
45 mV/V
373 mV/V
-> 4
+0.33 V/V
Barometric
15 mV/V
150 mV/V
300 mV/V
+ 0.2 V/V
-> 0b001
100 mV/V
620 mV/V
-> 7
+0.58 V/V
ZoomingADC for absolute sensor settings are:
InitAdc(0x00, 0x00, 0x00, 0x07, 0x00, 0x0d,
0x00, 0x02, 0x6e, 0x00, 0x04, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
ZoomingADC for barometric sensor settings are:
InitAdc(0x00, 0x00, 0x00, 0x07, 0x00, 0x0f,
0x01, 0x01, 0x4a, 0x01, 0x07, 0x03, 0x03,
0x00, 0x00, 0x00, 0x00);
© Semtech 2006
www.semtech.com
18
Application Note AN8000.05
ZoomingADC™
3.5
PGA SETTLING TIME
The PGAs are differential amplifiers; therefore they have to manage their own common mode output signal. This is
done with a low frequency feedback loop that requires time to stabilize. As the precision of the required
stabilization depends on the resolution that one wants to reach, the settling time of the PGA depends on the ADC
resolution. The settling time (in number of periods of fs) is equal to the oversampling ratio (OSR). Therefore when
using the PGAs, a delay must be placed in the software between the last access to one of the RegAcCfg1-5
register and the triggering of the ZoomingADC start. And this delay must be equal to (OSR * the period of fs).
Notes:
No such delay is required when the PGAs are off.
No such delay is required between two samples when the ZoomingADC settings are not modified (no write to
registers RegAcCfg1-5) between these samples.
By making a fake conversion with all registers set as required by the real conversion but SET_NELC = 0x00,
waiting for the fake conversion completion, one creates a delay of the correct duration.
© Semtech 2006
www.semtech.com
19
Application Note AN8000.05
ZoomingADC™
4
ADVANCED CONCEPTS
In this chapter, you will find:
The ZoomingADC impedance
Low power operation
Ratiometric measurement
© Semtech 2006
www.semtech.com
20
Application Note AN8000.05
ZoomingADC™
4.1 INTRODUCTION
This chapter introduced some more advanced concepts related to the ZoomingADC. Most of these are not
necessary for normal usage of the ZoomingADC, but they may help the reader to get the most from their Sensing
Machine.
4.2
THE ZOOMINGADC IMPEDANCE
The ZoomingADC is a switched capacitor based block. This means that it does not use resistors to fix gains, but
capacitors and switches. This has important implications on the nature of the input impedance of the block.
Basically, a switched capacitor is a way to emulate a resistor by using a capacitor. The capacitors are much easier
to realize on CMOS technologies and they show a very good matching precision.
V1
V2
V1
f
R
f
V2
C
The switched capacitor principle
A resistor is characterized by the current that flows through it (positive current leaves node V1):
I = R/ (V1 - V2)
One can verify that the mean current leaving node V1 with a capacitor switched at frequency f is:
<I> = (C/f) / (V1 - V2)
Therefore as a mean value, the switched capacitor C/f is equivalent to a resistor.
It is important to consider that this is only a mean value. If the current is not integrated (low impedance source), the
impedance is infinite during the whole time but the transition.
What does it mean for the ZoomingADC?
If the fs clock is reduced, the mean impedance is increased. By dividing the fs clock by a factor 10, the impedance
is increased by a factor 10.
One can reduce the capacitor that is switched by using an amplifier set to its minimal gain. In particular if PGA1 is
used with gain 1, its mean impedance is 10x bigger than when it is used with gain 10.
current integration
Sensor impedance
Sensor
Sensing Machine (model)
V1
f
node
capacitance
f
V2
C
The switched capacitor principle
© Semtech 2006
www.semtech.com
21
Application Note AN8000.05
ZoomingADC™
One can increase the effective impedance by increasing the electrical bandwidth of the sensor node so that the
switching current is absorbed through the sensor before the switching period is over. Measuring the sensor node
will show short voltage spikes at the frequency fs, but these will not influence the measurement. Whereas if the
bandwidth of the node is lower, no spikes will arise, but a small offset can be generated by the integration of the
charges generated by the switched capacitors, this corresponds to the mean impedance effect.
Note:
One can increase the mean input impedance of the ZoomingADC by lowering the acquisition clock fs.
One can increase the mean input impedance of the ZoomingADC by decreasing the gain of the first enabled
amplifier.
One can increase the effective input impedance of the ZoomingADC by having a source with a high electrical
bandwidth (sensor electrical bandwidth much higher than fs).
4.3
REDUCING THE CURRENT OF THE ADC AND OF THE PGAS
The ADC and the PGAs include amplifiers which bias current is set so that they have a sufficient bandwidth to
achieve the full resolution of the ADC at its maximal speed.
When the ADC is used at a lower speed (reducing fs), the current in the ADC and in the PGA can be reduced by
the same amount.
One can also notice that it is good practice to disable any unused PGA. Enabling and setting the bias current is
made with the bits Enable, BiasPga and BiasAdc of the register RegAcCfg1.
When the ZoomingADC is not used, it should be turned off.
4.4
RATIOMETRIC MEASUREMENTS
The principle of the ZoomingADC is ratiometric. This means that the whole measurement is proportional to the
reference voltage. Therefore one could put a ratiometric sensor in front of the ZoomingADC, and use its bias
voltage as a reference voltage for the ZoomingADC and the result should not depend on the applied bias. This is
globally true, but the linearity of the gain with respect to the reference voltage is not as high as the input signal
linearity of the ZoomingADC, therefore for maximal precision one should operate at fixed reference voltage.
One relatively fixed voltage that is available on the Sensing Machine is the regulated voltage Vreg. It is not precise
but its variation with the voltage supply variation is low, and therefore this voltage is much more stable than the
supply voltage. It can be used directly to bias highly resistive loads or it can be buffered (using one of the DAC
buffers of the XE8805 Sensing Machine as an example) to bias other loads.
Check the datasheet for numbers on the ZoomingADC PSRR (Power Supply Rejection Ratio).
© Semtech 2006
www.semtech.com
22
Application Note AN8000.05
ZoomingADC™
5
CALLING THE ZOOMINGADC IN AN XE8000 APPLICATION
In this chapter, you will find:
How to build a simple application using the ZoomingADC
The initialization of such an application
Some other relevant software tricks
© Semtech 2006
www.semtech.com
23
Application Note AN8000.05
ZoomingADC™
5.1
INTRODUCTION
A very basic sample application is proposed, this is an application that can be downloaded from the SEMTECH
web site. It makes acquisitions with the settings chosen by the user and outputs the acquisition results to the UART
so that one can read the result with any terminal application.
This application can be used to test the concepts proposed in this booklet or as a base for a first complete
acquisition application.
See the SEMTECH technical note TN8000.16 for explanations on the usage of the ProStart and of the RIDE
development environment. Reference code is compiled at optimization level 1.
5.2
INSTALLING THE SAMPLE APPLICATION
To install and run the sample application we suggest using the following procedure:
1) RIDE development environment for XE8000 must be installed. The RIDE application should not be open.
2) Download the "ZoomingADCDemo.zip" file that contains the sample application from SEMTECH web site.
3) Decompress it (option "Use folder name" must be set). Now your project files are in the "ZoomingADCDemo"
folder, the source files are in "ZoomingADCDemo/Src" folder and the documentation files are in the
"ZoomingADCDemo/Doc" folder (including the spreadsheets to help evaluate the ZoomingADC settings).
4) Double click on the file "zoomingadc demo.prj" in the folder "ZoomingADCDemo". The project is now ready to be
compiled or downloaded to the ProStart (see RIDE manuals to know how to do that). For simulation, the project
has to be modified as the code is calling real time functions that can take a long time to simulate (crystal oscillator
start-up).
5.3
ZOOMINGADC SAMPLE APPLICATION PRINCIPLE.
The sample application first initializes all peripherals, then programs the settings of the ZoomingADC and starts an
acquisition. It waits for the result, sends it the UART, and starts a new conversion.
© Semtech 2006
www.semtech.com
24
Application Note AN8000.05
ZoomingADC™
Peripherals initialization
Interrupt initialisation
Enable ADC interruptions
Start acquisition of one
sample
Halt
End of acquisition interrupt routine:
Push result from acquisition to AdcValue
Resume on RTI
Push AdcValue to UART
Acquisition program working on interrupts
5.4
SETTINGS FOR THE SAMPLE APPLICATION
ref
RS232
PC
signal
supply
XE8000EV104
XE8000MP
Supply is connected to VDDA_1 (+) and GND (-)
Signal is connected to AC_A(1) (+) and AC_A(0) (-)
Ref is connected to AC_R(1) (+) and AC_R(0) (-)
Terminal
via serial port
Power supply
The PC will receive the information that has been read by the ZoomingADC. To do that one can use a terminal
application like HyperTerminal. The terminal settings must be 38400 bauds, 8-bits ASCII, no parity, and 1 stop bit.
The sample application will send the value it has read in ASCII format to the terminal via the UART of the
XE8000MP.
© Semtech 2006
www.semtech.com
25
Application Note AN8000.05
ZoomingADC™
5.5 INITIALIZATION
The initialization is made by calling the initialization routines (all initialization routines are in "Initialisation.c"):
InitPortA();
InitPortB();
InitPortC();
InitUART(38400, 1, 0, 0, 2);
InitCounters();
//
//
//
//
//
//
Initializes PortA
Initializes PortB
Initializes PortC
Initialises the UART communications
InitUART will set the RC to 1.23 MHz
Initializes Counters
Port A is set as input with pull-ups.
Port B and C are set as outputs.
RC oscillator is set in the UART initialization routine.
Counters are set to 0.
The UART is slightly more complex as it is directly set to its operating value. In the sample application, one sets it
to 38 kbaud, 8 bits, no parity. This routine will set the RC oscillator frequency to 1.23 MHz. It needs the Xtal
oscillator to precisely set the RC oscillator.
Note:
The 32 kHz crystal resonator must be connected to the chip for the InitUART function to operate.
The ZoomingADC initialization will be discussed below.
When the initialization is done, one enables the interrupts:
RegIrqEnHig |= 0x80;
5.6
// Enable interrupts
ZOOMINGADC INITIALIZATION
The ZoomingADC initialization routine takes all parameters for the ZoomingADC and puts them in the right bit of
the right registers.
One calls the ZoomingAdcInit with the following parameters:
/*******************************************************************
** -------------------General Parameters--------------------------**
** Default
: 0x00 - 0x01
g1
[1 reset to default
] **
** Freq
: 0x00 - 0x03
g2
[1/4, 1/8, 1/32*RC, 8kHz] **
** Nelconv
: 0x00 - 0x03
g3
[1, 2, 4, 8 conversions ] **
** OSR
: 0x00 - 0x07
g4
[8,16,32,...,1024
OSR ] **
** Cont
: 0x00 - 0x01
g5
[continued,discontinued ] **
** Enable
: 0x00 - 0x0F
g6
[Pga3, Pga2, Pga1, Adc ] **
** ---------------------Pga parameters--------------------------- **
** Pga1Gain
: 0x00 - 0x01
p1
[1, 10
] **
** Pga2Gain
: 0x00 - 0x03
p2
[1, 2, 5, 10
] **
** Pga3Gain
: 0x00 - 0x7F
p3
[0.083, ..., 10
] **
** Pga2Off
: 0x00 - 0x0F
p4
[-1, -0.8, ..., 1
] **
** Pga3Off
: 0x00 - 0x7F
p5
[-5.25,-5.16,...,5.25
] **
** BiasAdc
: 0x00 - 0x03
p6
[25, 50 ,75 100% *Inom ] **
** BiasPga
: 0x00 - 0x03
p7
[25, 50 ,75 100% *Inom ] **
**----------------------Mux parameters----------------------------**
** AMuxMode : 0x00 - 0x01
m1
[differential, common ] **
** AMuxSign : 0x00 - 0x01
m2
[normal, inverted
] **
** AMuxChan : 0x00 - 0x07
m3
[channel selection 1-8 ] **
** VMuxChan : 0x00 - 0x01
m4
[R1-R0, R3-R2
] **
*******************************************************************/
//
g1 g2 g3 g4
g5 g6 p1 p2 p3
p4 p5
p6 p7 m1 m2 m3 m4
InitAdc(0, 0, 0, 0x07, 0, 1, 0, 0, 0x0C, 0, 0x06, 3, 3, 0, 0, 0, 0);
No check is made on the parameters, they are just shifted to their correct location and masked.
© Semtech 2006
www.semtech.com
26
Application Note AN8000.05
ZoomingADC™
Internally, the routine is the following (_U8 is an unsigned 8 bit value):
_U8 InitAdc(_U8
_U8
_U8
_U8
Default, _U8 Freq, _U8 Nelconv, _U8 Osr, _U8 Cont,
Enable, _U8 Pga1Gain, _U8 Pga2Gain, _U8 Pga3Gain,
Pga2Off, _U8 Pga3Off, _U8 BiasAdc, _U8 BiasPga,
AMuxMode, _U8 AMuxSign, _U8 AMuxChan, _U8 VMuxChan ){
RegAcCfg0 = (((Nelconv << 5 ) & 0x60) | ((Osr << 2) & 0x1C) | ((Cont << 1) & 0x02));
RegAcCfg1 = (((BiasAdc << 6) & 0xC0) | ((BiasPga << 4 ) & 0x30) | (Enable & 0x0F));
RegAcCfg2 = (((Freq << 6) & 0xC0) | ((Pga2Gain << 4) & 0x30 ) | (Pga2Off & 0x0F));
RegAcCfg3 = (((Pga1Gain << 7) & 0x80) | (Pga3Gain & 0x7F));
RegAcCfg4 = (Pga3Off & 0x7F);
RegAcCfg5 = (((Default << 6) & 0x40) | ((AMuxMode << 5) & 0x20)|
((AMuxSign << 4) & 0x10) |((AMuxChan << 1) & 0x0E) | (VMuxChan & 0x01));
} // InitAdc()
5.7
ZOOMINGADC ROUTINES
A few routines have been written to control directly the ZoomingADC. The main one is the InitAdc() described in
the previous chapter.
In addition routines to stop the ZoomingADC (go to low power) and read the results from the ADC are proposed
here.
The first one triggers the ZoomingADC. It starts its conversion according to the settings used in InitAdc().
void Start_ZoomingAdc (void){
RegAcCfg0 |= 0x80;
}
// Start by setting start bit
The second function stops the ZoomingADC and sets it in its lowest power mode. One uses InitAdc() to reset the
ZoomingADC for a new conversion.
void Stop_ZoomingAdc (void){
// Disables the ZoomingADC, the 3 Pga's and reduce the bias to the min
RegAcCfg1 &= 0xFF;
}
The third function reads the result of the conversion and returns it as an integer. Type _S16 is a signed integer on
16 bits. Type T_S16_U8 is a hybrid that can be used as an integer or a set of two bytes. It is used to read the
peripheral result and return it as an integer.
_S16 R_RegAcOut(void){
T_S16_U8 v;
v.U8.Msb = RegAcOutMsb;
v.U8.Lsb = RegAcOutLsb;
return v.S16;
}
// use T_S16_U8 type to order the Msb and Lsb
// copy byte per byte
// return signed result
The last function just waits for the busy bit of the ZoomingADC to come back to its low value (conversion is
finished). This is used when the software is not operating on interrupts. Be aware that the busy bit is only set after
one cycle of the ZoomingADC clock (at frequency fs), to that if one checks the busy bit just after triggering the
ZoomingADC to start a new conversion; it will not be high yet. This function is not used when using the interrupt to
detect the end of conversion.
void PoolingADC(void){
while(RegAcCfg5 & 0x80);
}
© Semtech 2006
www.semtech.com
27
Application Note AN8000.05
ZoomingADC™
5.8
UART ROUTINES
The UART control routines are in the UartHandler.c file. These are not optimized for speed but for readability.
Note:
The UartInit() UART initialization routine "Initialize.c" has been partially disabled (no baudrate selection anymore)
to limit the application code size. It can be enabled again by changing the "/** /" comment starter at the begin of the
switch statement to "/**/" (erase the space between the second "*" and the second "/").
© Semtech 2006
www.semtech.com
28
Application Note AN8000.05
ZoomingADC™
5.9
COMPLETE SAMPLE APPLICATION, MAIN CODE
InitPortA();
InitPortB();
InitPortC();
InitUART(38400, 1, 0, 0, 2);
InitCounters();
//
//
//
//
//
//
Initializes PortA
Initializes PortB
Initializes PortC
Initialises the UART communications
InitUART will set RC to 1.2 MHz
Initializes Counters
InitAdc(0, 0, 2, 7, 0, 1, 0, 0, 0x0C, 0, 0x06, 3, 3, 0, 0, 3, 0
RegIrqEnHig |= 0x80;
);
// Enable interrupts
while(1){
Start_ZoomingAdc(); // trigger the start bit of the ZoomingADC
asm("halt");
}
// wait for next interrupt
// the return from acquisition will be handled
// by the ZoomingADC IRQ handler
SendString("Out: ");
SendInt(AdcValue);
SendString("\r\n");
}
// while(1)
// main()
// send value to UART
© Semtech 2006
www.semtech.com
29
Application Note AN8000.05
ZoomingADC™
6
APPENDIX
In this chapter, you will find:
¾ Useful tricks and tips
© Semtech 2006
www.semtech.com
30
Application Note AN8000.05
ZoomingADC™
6.1
OPERATING THE SENSING MACHINE ON THE PROSTART AT DIFFERENT VOLTAGES
The XE8000MP board of the ProStart has an on-board voltage regulator. The voltage generated by this regulator is
the Vbat of the Sensing Machine and it is available on pin VDDA_1 of the ProStart.
The user can select this voltage with in RIDE with Options->Debug->Other tools->Advanced options. This selection
lets the user choose between 2.4 V, 3.0 V and 5.0 V operations. The user can also use a DOS level command
"prostartinterface 2 com1 -s 2.4" where com1 is the PC port name and 2.4 is the selected voltage. With this
command, the voltage can be set in steps of 0.1 V from 1.0 V to 5.5 V. The precision of this regulator is not very
high. For precision measurements, it is suggested that the user measures the generated voltage to have its exact
value.
In both cases (voltage selection through RIDE or through the DOS level command), the XE8000MP must be
connected to the PC com port via its PROG RS-232 connector.
© Semtech 2006
www.semtech.com
31
Application Note AN8000.05
ZoomingADC™
6.2
Hex
0x00
0x01
0x02
0x03
0x04
0x05
0x06
0x07
0x08
0x09
0x0A
0x0B
0x0C
0x0D
0x0E
0x0F
0x10
0x11
0x12
0x13
0x14
0x15
0x16
0x17
0x18
0x19
0x1A
0x1B
0x1C
0x1D
0x1E
0x1F
0x20
0x21
0x22
0x23
0x24
0x25
0x26
0x27
0x28
0x29
0x2A
0x2B
0x2C
0x2D
0x2E
0x2F
0x30
0x31
0x32
0x33
0x34
0x35
0x36
0x37
0x38
0x39
0x3A
0x3B
0x3C
0x3D
0x3E
0x3F
HEX - DEC - BIN TABLE
Dec Bin
Hex
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0001
0001
0001
0001
0001
0001
0001
0001
0001
0001
0001
0001
0001
0001
0001
0001
0010
0010
0010
0010
0010
0010
0010
0010
0010
0010
0010
0010
0010
0010
0010
0010
0011
0011
0011
0011
0011
0011
0011
0011
0011
0011
0011
0011
0011
0011
0011
0011
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0x40
0x41
0x42
0x43
0x44
0x45
0x46
0x47
0x48
0x49
0x4A
0x4B
0x4C
0x4D
0x4E
0x4F
0x50
0x51
0x52
0x53
0x54
0x55
0x56
0x57
0x58
0x59
0x5A
0x5B
0x5C
0x5D
0x5E
0x5F
0x60
0x61
0x62
0x63
0x64
0x65
0x66
0x67
0x68
0x69
0x6A
0x6B
0x6C
0x6D
0x6E
0x6F
0x70
0x71
0x72
0x73
0x74
0x75
0x76
0x77
0x78
0x79
0x7A
0x7B
0x7C
0x7D
0x7E
0x7F
Dec
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
Bin
0100
0100
0100
0100
0100
0100
0100
0100
0100
0100
0100
0100
0100
0100
0100
0100
0101
0101
0101
0101
0101
0101
0101
0101
0101
0101
0101
0101
0101
0101
0101
0101
0110
0110
0110
0110
0110
0110
0110
0110
0110
0110
0110
0110
0110
0110
0110
0110
0111
0111
0111
0111
0111
0111
0111
0111
0111
0111
0111
0111
0111
0111
0111
0111
Hex
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0x80
0x81
0x82
0x83
0x84
0x85
0x86
0x87
0x88
0x89
0x8A
0x8B
0x8C
0x8D
0x8E
0x8F
0x90
0x91
0x92
0x93
0x94
0x95
0x96
0x97
0x98
0x99
0x9A
0x9B
0x9C
0x9D
0x9E
0x9F
0xA0
0xA1
0xA2
0xA3
0xA4
0xA5
0xA6
0xA7
0xA8
0xA9
0xAA
0xAB
0xAC
0xAD
0xAE
0xAF
0xB0
0xB1
0xB2
0xB3
0xB4
0xB5
0xB6
0xB7
0xB8
0xB9
0xBA
0xBB
0xBC
0xBD
0xBE
0xBF
© Semtech 2006
Dec
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
Bin
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1001
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1010
1011
1011
1011
1011
1011
1011
1011
1011
1011
1011
1011
1011
1011
1011
1011
1011
Hex
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0xC0
0xC1
0xC2
0xC3
0xC4
0xC5
0xC6
0xC7
0xC8
0xC9
0xCA
0xCB
0xCC
0xCD
0xCE
0xCF
0xD0
0xD1
0xD2
0xD3
0xD4
0xD5
0xD6
0xD7
0xD8
0xD9
0xDA
0xDB
0xDC
0xDD
0xDE
0xDF
0xE0
0xE1
0xE2
0xE3
0xE4
0xE5
0xE6
0xE7
0xE8
0xE9
0xEA
0xEB
0xEC
0xED
0xEE
0xEF
0xF0
0xF1
0xF2
0xF3
0xF4
0xF5
0xF6
0xF7
0xF8
0xF9
0xFA
0xFB
0xFC
0xFD
0xFE
0xFF
Dec
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
Bin
1100
1100
1100
1100
1100
1100
1100
1100
1100
1100
1100
1100
1100
1100
1100
1100
1101
1101
1101
1101
1101
1101
1101
1101
1101
1101
1101
1101
1101
1101
1101
1101
1110
1110
1110
1110
1110
1110
1110
1110
1110
1110
1110
1110
1110
1110
1110
1110
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
www.semtech.com
32
Application Note AN8000.05
ZoomingADC™
© Semtech 2006
All rights reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner. The
information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and
may be changed without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof
does not convey nor imply any license under patent or other industrial or intellectual property rights. Semtech. assumes no
responsibility or liability whatsoever for any failure or unexpected operation resulting from misuse, neglect improper installation,
repair or improper handling or unusual physical or electrical stress including, but not limited to, exposure to parameters beyond the
specified maximum ratings or operation outside the specified range.
SEMTECH PRODUCTS ARE NOT DESIGNED, INTENDED, AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN
LIFE-SUPPORT APPLICATIONS, DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS. INCLUSION OF SEMTECH
PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE UNDERTAKEN SOLELY AT THE CUSTOMER’S OWN RISK.
Should a customer purchase or use Semtech products for any such unauthorized application, the customer shall indemnify and
hold Semtech and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs damages and
attorney fees which could arise.
Contact Information
Semtech Corporation
Wireless and Sensing Products Division
200 Flynn Road, Camarillo, CA 93012
Phone (805) 498-2111 Fax : (805) 498-3804
© Semtech 2006
www.semtech.com
33