Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

Similar documents
This document describes the features of the GUI program used to control Power Line Modem with E-Meter Platform.

TMS470R1x External Clock Prescale (ECP) Reference Guide

Table 1. Proper Termination of Unused (Port) Pins in a Single-Port PSE System

Application Report. 1 Hardware Description. John Fahrenbruch... MSP430 Applications

Application Report. 1 Introduction. MSP430 Applications. Keith Quiring... ABSTRACT

XIO1100 NAND-Tree Test

DSP/BIOS Link. Platform Guide Published on 20 th JUNE Copyright 2009 Texas Instruments Incorporated.

TMS320C64x DSP Peripheral Component Interconnect (PCI) Performance

SN5476, SN54LS76A SN7476, SN74LS76A DUAL J-K FLIP-FLOPS WITH PRESET AND CLEAR

Power Line Modem with E-Meter Platform Quick Start Guide

AC Induction Motor (ACIM) Control Board

TMS320C6000 DSP Interrupt Selector Reference Guide

Using Endianess Conversion in the OMAP5910 Device

Application Report. 1 System Requirements. 2 Using the DM643x Pin Multiplexing Utility. Bernard Thompson...

TMS470R1VF334E TMS470 Microcontrollers Silicon Errata

PCIxx12 Single Socket CardBus Controller with Integrated 1394a-2000 OHCI Two-Port PHY/Link-Layer Controller

Quad-Channel TEC Controller Getting Started Guide. Contents. Introduction. Contents of Evaluation Kit

System-on-Chip Battery Board User s Guide

TMS320C6000 DSP 32-Bit Timer Reference Guide

Application Report. Low-Power Wireless. Shreharsha Rao... ABSTRACT

The examples in this application report require the Flash API Modules (SPRC236) within the "Tools & Software" folder.

External Programming of the TMS320C64x EDMA for Low Overhead Data Transfers

Stacking the REF50xx for High-Voltage References

TMS320C620x/C670x DSP Boot Modes and Configuration Reference Guide

Interfacing the ADS8320/ADS8325 to The TMS320C6711 DSP

ez430-rf2480 Sensor Monitor SWRU Low-Power RF

description VCC 1PRE 1OC 1D1 1C 1Q1 1Q2 1Q3 1Q4 2Q1 2Q2 2Q3 2Q4 2C 2PRE 1D2 1D3 1D4 2D1 2D2 2D3 2D4 2OC GND 1PRE 1OC 1Q1 1D1 1Q2 1Q3 1Q4 1D2 1D3 1D4

TMS320C6000 DSP General-Purpose Input/Output (GPIO) Reference Guide

SN54155, SN54156, SN54LS155A, SN54LS156, SN74155, SN74156, SN74LS155A, SN74LS156 DUAL 2-LINE TO 4-LINE DECODERS/DEMULTIPLEXERS

Wolverine - based microcontrollers. Slashing all MCU power consumption in half

TMS320C672x DSP Software-Programmable Phase-Locked Loop (PLL) Controller. Reference Guide

TMS320C6414T/15T/16T Power Consumption Summary

DS25BR204 Evaluation Kit

Bootstrap Loader (BSL) Scripter User s Guide

TCI6616/C6670/TCI6608/C6678 Device Simulator EMAC Model I/O user-guide

Application Note AN045

TVP5146 PDC and VPS APPLICATION NOTE HPA Digital Audio Video

Hands-On: Implementing an RF link with MSP430 and CC1100

DAP Signal Conditioning Board. User s Guide. Data Acquistion Digital/Analog Converters SLAU105

PRODUCT DATASHEET. Features. IPNetCam Reference Design on DM365 Product Release 1.5.0, Nov 2009

Protecting the TPS25810 from High Voltage DFPs

TPS62290EVM-279. User's Guide SLVU217 July 2007

WL1271 ini File Description and Parameters User's Guide

OMAP5912 Multimedia Processor Direct Memory Access (DMA) Support Reference Guide

Application Report. 1 Overview. Marc Sousa... Power Supply ABSTRACT

27 - Line SCSI Terminator With Split Disconnect

Ethernet-Enabled Intelligent Display Modules (IDMs)

DaVinci System Optimization

TMS320VC5501/5502 DSP Host Port Interface (HPI) Reference Guide

TMS320C55x DSP Peripherals Overview Reference Guide. Preliminary Draft

Using the DSP in the Dual-Core DaVinci as a Graphics Render Engine

Increase Current Drive Using LVDS

TFP101, TFP201, TFP401, TFP401A 2Pix/Clk Output Mode

PACKAGE OPTION ADDENDUM

4-Level Strap Device Configuration

DRV8833 Evaluation Module. User's Guide

Debugging Shared Memory Systems

WLAN Design Considerations

TMS320VC5510 DSP Host Port Interface (HPI) Reference Guide

C Fast RTS Library User Guide (Rev 1.0)

Data sheet acquired from Harris Semiconductor SCHS041D Revised October 2003

HV Solar MPPT DC-DC GUI Overview. Getting Started Guide

SN64BCT757 OCTAL BUFFER/DRIVER WITH OPEN-COLLECTOR OUTPUTS

Table 1. EVM Description

In order for this EVM to operate properly, the following components must be connected and properly configured.

Stereo Audio Volume Control

EV Software Rev Evaluation System User Guide. Introduction. Contents. Hardware and Software Setup. Software Installation

Maximizing Endurance of MSC1210 Flash Memory

User s Guide for Sonic MDIO Software

February 2004 PMP Portable Power SLVU101

Techniques for Profiling on ROM-Based Applications

TMS Bit RISC ARM7TDMI -Based Microcontroller Platform

2. With the Evaluation Kit DVD, click the Tools button and then click the Code Composer Studio logo to start the setup program.

FEATURES APPLICATIONS DESCRIPTION

MSC1211/12 DAC INL Improvement

Passing CISPR25-Radiated Emissions Using TPS54160-Q1

Design Considerations for Avoiding Timing Errors during High-Speed ADC, High-Speed ADC, LVDS Data Interface with FPGA

UCD3138 Responding to Multiple PMBus Slave Addresses

Stereo Dac Motherboard application information

RapidIO Rev 2.0 for Next-Generation Communication and Embedded Systems. Travis Scheckel Texas Instruments

INVENTORY HISTORY REPORT EXTENSION. User Guide. User Guide Page 1

CUSTOM GOOGLE SEARCH. User Guide. User Guide Page 1

Connecting Bluetooth to the OMAP5910

IndoTraq Development Kit 1: Command Reference

SN74BCT756 OCTAL BUFFER/DRIVER WITH OPEN-COLLECTOR OUTPUTS

SN54LS169B, SN54S169 SN74LS169B, SN74S169 SYNCHRONOUS 4-BIT UP/DOWN BINARY COUNTERS

TPS63020EVM-487. User's Guide. 1 Introduction. 1.1 Background. 1.2 Performance Specification

INVENTORY REPORT EXTENSION. User Guide. User Guide Page 1

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C5510 DSK

COMMUNICATIONS WITH THE MULTI- CHANNEL HOST P RT INTERFACE

ADD RELATED PRODUCTS TO CART. User Guide. User Guide Page 1

PurePath Studio GDE User s Guide Graphical Development Environment for TAS3xxx Digital Audio Processors. User's Guide. Mixed Signal Audio Applications

PROGRAMMING THE MSC1210

18-Line SCSI Terminator (Reverse Disconnect) UCC5617 FEATURES DESCRIPTION BLOCK DIAGRAM

Using the TMS320VC5509/5510 Enhanced HPI

A DSP/BIOS AIC23 Codec Device Driver for the TMS320C6416 DSK

SN5446A, 47A, 48, SN54LS47, LS48, LS49 SN7446A, 47A, 48, SN74LS47, LS48, LS49 BCD-TO-SEVEN-SEGMENT DECODERS/DRIVERS

Texas Instruments Voltage-Level-Translation Devices

TMS320C6000 DSP Software-Programmable Phase-Locked Loop (PLL) Controller Reference Guide

WM8805_6152_DS28_EV1_REV3 Schematic and Layout. WM8805_6152_DS28_EV1_REV3 Schematic and Layout. Customer Information 1 of 18 June 2007, Rev 3.

Transcription:

Application Report SBAA099 August 2003 Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218 Joseph Wu Data Acquisition Group ABSTRACT In order to achieve the best possible performance, offset and gain can be often be calibrated in highresolution analogtodigital converters (ADCs). Changes in temperature, PGA gain, power supply voltage, or most importantly, decimation ratio can influence the accuracy of measurement. This application note explains how the calibration routines work and how to generate values for the fullscale register (FSR) and the offset calibration register (OCR) in the ADS1216, ADS1217, and ADS1218 family of ADCs. These deltasigma ( Σ) ADCs rely on five different codes to perform two different types of calibration. First, there are three selfcalibration routines: SELFOCAL, SELFGCAL, and SELFCAL. There are also system calibration routines: SYSOCAL and SYSGCAL. Each of these calibrations will have an effect on the FSR, OCR, or both. Deltasigma ADCs use oversampling as a means to obtain high resolution. These 24bit, 8channel components offer precision and a wide dynamic range operating from 2.7V to 5.25V supplies. Internal buffers create highimpedance inputs, allowing for direct connections to transducers or lowlevel voltage signals. The first product in this family is the ADS1216, which has an input range of ±V REF (in PGA gain = 1). The ADS1218 features an additional 4kBytes of FLASH memory. The ADS1217 is similar to the ADS1216, except the input range is doubled to ±2V REF (in PGA gain = 1). This application note also applies to the MSC1210, MSC1211, and MSC1212, which incorporate a similar 8channel ADC. Contents 1 Calibration...2 1.1 Self Calibration...2 1.2 System Calibration...2 2 Digital Filter and Calibration Register Details...3 3 Examples...6 4 Conclusion...7 5 Calibration Notes...8 6 Glossary...9 7 References...9 1

1 Calibration Calibration can be influenced by changes in the operation of the ADS1216, ADS1217, and ADS1218. Variations in temperature, PGA gain, reference voltage, or decimation ratio can affect the expected values in the Offset Calibration Register (OCR) and Full Scale Register (FSR). The output of the digital filter is modified by both values before sending the data to the Data Output Register (DOR). The ADS1216, ADS1217, and ADS1218 each have two groups of calibration codes, selfcalibration and system calibration. There are five separate calibration codes for this family of devices. These codes are detailed in Sections 1.1 and 1.2. 1.1 Self Calibration The first type of calibration in the ADS1216, ADS1217 or ADS1218 is an internal or selfcalibration. There are three selfcal codes. Note that some of these comments are taken directly from the relevant datasheets. (See References for complete information.) SELFOCAL In the selfoffset calibration, both inputs to the converter are internally tied to the AINCOM line. The input is thus zeroed. The OCR then records the output of the digital filter. Future readings subtract the contents of this register from the digital filter output. This calibrates for internal inherent offset errors in the part. SELFGCAL The selfgain calibration is used to calibrate for the gain in the part. The converter inputs are internally tied to the V REF and V REF lines, and the converter assumes the inputs to be the positive fullscale for the ADS1216 and ADS1218 (for the ADS1217 it is assumed to be 1/2 of the positive fullscale because of its larger input range). SELFGCAL compensates for gain errors that come from the digital filter and updates the FSR. In PGA gain other than 1, circuitry compensates to scale the reference. SELFCAL The selfcalibration routine runs a SELFOCAL and then a SELFGCAL. This updates both the OCR and FSR. 1.2 System Calibration The other type of calibration is an external or system calibration. In these calibration routines, the appropriate signal must be put onto the selected inputs. SYSOCAL In the system offset calibration, the user must select the input channels, zero the inputs and then run the SYSOCAL command. This allows the user to calibrate out any offset errors associated with the entire system. This command updates the OCR. SYSGCAL For system gain calibration, the user must select the input channels, supply the positive fullscale input, and then run the SYSGCAL command. This command updates the FSR. 2 Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

2 Digital Filter and Calibration Register Details ADS1216, ADS1217, and ADS1218 all have a digital filter that can run in one of four modes selectable in the Mode and Decimation Register. Each mode is based on a sin(x)/x or a sinc filter. The fast settling filter (FS) settles in one t data period. The sinc 2 filter (S2) has lower noise and settles in two t data periods. The sinc 3 filter (S3) has even lower noise but settles in three t data periods. The final mode of operation is the auto mode. In this mode, the output of the digital filter is such that the first two data reads come from FS, the third comes from S2, and the fourth and subsequent reads come from S3. For more on these modes of operation, see the respective datasheets. Calibration for first two modes of digital filtering will be noisier and result in less accurate values in the OCR and FSR. The digital filter is the key to all calibrations. The digital filter gain changes as the decimation ratio changes. The OCR zeroes the offset of the input circuitry and modulator up to the digital filter while the FSR calibrates for fullscale changes that come from changes in the decimation ratio. Calibration for either offset or gain requires 7t data periods (a SELFCAL which does both an offset and gain calibration will therefore take 14t data periods). This is because in both cases, the input is sampling either the zeroed offset or the V REF. To get the best values for the register, seven samples are taken from the filter. The first three are discarded and the latter four are averaged. The digital filter and the implementation of the OCR and FSR registers are shown in Figure 1. Modulator Digital Filter Offset Σ Gain X DOR Reg Reference DR OCR Reg FSR Reg Figure 1. Digital Filter and Calibration Registers of the ADS1216, ADS1217, and ADS1218 The output of the modulator is sent to the digital filter where it is scaled by a function of the decimation ratio (DR). The value of the OCR register is then subtracted from the output of the digital filter. FSR is then multiplied to get the DOR. First, the digital filter gain is applied to the modulator output. The digital filter gain (DFG) is a function of decimation ratio and is given by the equation below. 3 A DFG = (DR 3 2 ) (1) 4 Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218 3

In addition to the decimation ratio, the digital filter gain is also affected by a scale factor to align the digits of the digital filter for low decimation ratios. This is given in the above equation as A. The factor A is an integer number that is also determined by the decimation ratio listed in Table 1. Given a decimation ratio, the table shows what value of A to use. Decimation ratios not given in the table must be rounded up to get A (for example, DR of 1000 rounds to 1023 and uses A = 7). TABLE 1. Digital Filter Gain for a Given Decimation Ratio DR A DFG (multiply by DR 3 ) 20 10 768 25 9 384 31 8 192 40 7 96 50 6 48 63 5 24 80 4 12 101 3 6 127 2 3 161 1 1.5 203 0 0.75 255 1 0.375 322 2 0.1875 406 3 0.09375 511 4 0.046875 645 5 0.0234375 812 6 0.01171875 1,023 7 0.005859375 1,290 8 0.002929688 1,625 9 0.001464844 2,047 10 0.000732422 After the digital filter, the value of the OCR is subtracted. In a calibration, the OCR is generated during an offset calibration cycle, where the inputs are tied to what is expected to be a zero offset. The output of the digital filter is recorded into the OCR register. This offset value is then subtracted from subsequent readings. Figure 2 illustrates the offset calibration process. 4 Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

Zeroed Modulator Digital Filter OCR Register Reference DR SELFOCAL = internally tied to AINCOM. SYSOCAL = externally zeroed by user. Figure 2. Generation of the OCR Register Value in Calibration After the OCR is subtracted, the FSR is multiplied to get the output data. The FSR aligns the full scale to the reference voltage. During a gain calibration, the inputs are set to the reference voltage (for the ADS1216 and ADS1218, this is the positive full scale; for the ADS1217, this is 1/2 of the positive full scale). The output of the digital filter during a gain calibration has the OCR subtracted, and this value is used to calibrate the output to a positive full scale. By using a reciprocal function, the FSR is calculated. Mathematically, the output of the digital filter, with the OCR subtracted out, is divided from h1fffffffffff. This process is given in the equation below and is illustrated by the diagram in Figure 3. FSR = h1fffffffffff DigitalFilterOutput OCR (2) FullScale Modulator Digital Filter Offset Σ Recip Function FSR Register Reference DR OCR Reg SELFGCAL = internally tied to scale of V REF. SYSGCAL = externally tied to a positive fullscale. Figure 3. Generation of the FSR Register Value in Calibration For different PGA gains, note that in a selfgain calibration, the inputs are internally set to a scale of V REF. In a system gain calibration, the inputs should be set to the proper positive full scale, depending on PGA gain and reference voltage. Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218 5

In the offset calibration, the input is set to zero and the OCR is found with whatever Vin the modulator sees. The FSR is independent of offset calibration. In gain calibrations, the modulator inputs are set to V REF and V REF, FSR is calculated to ensure that the output reads positive full scale (the DOR reads h7fffff). Now, with some understanding of how the OCR and FSR registers are calculated and used, the equations for the DOR can be found. For the ADS 1216 and ADS1218 they are: Vin FSR DOR = DFG OCR 22 V REF 2 in bipolar mode and (3) Vin FSR DOR = DFG OCR 21 V REF 2 in unipolar mode. (4) For the ADS1217 it is: Vin FSR DOR = DFG OCR 22 2 V REF 2 in bipolar mode and (5) Vin FSR DOR = DFG OCR 21 2 V REF 2 in unipolar mode (6) 3 Examples Here are a few examples to illustrate how the OCR and FSR are determined. Example 1 An ADS1217 is running in bipolar mode with a reference input of 2.5V, an offset of 0V, and a decimation ratio of 625. A SELFCAL is run (which is the same as running a SELFOCAL and then a SELFGCAL in sequence. With the inputs at 0V, OCR is determined to be ideally h000000. The FSR, however, is calculated by working backward from the reciprocal function: ( h FFFFFFFFFFF ) ( DFG OCR) FSR = 1 (7) The FSR = [(h1fffffffffff)/((.75*625 3 *2 5 )h000000)] = h5dd332. 6 Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

Example 2 An ADS1216 is running in unipolar mode with a reference input of 1.25V and a decimation ratio of 200. However, the user accidentally puts in an input of 0.5V across channels AIN0 and AIN1, selects those channels, and runs a SYSOCAL and then a SELFGCAL. The large error in the offset causes an error in the gain calibration. Vin OCR = DFG (8) VREF Here the OCR = (0.5/1.25)*(0.75*200 3 *2 0 ) = 2400000 = h249f00. The FSR = [(h1fffffffffff)/((.75*200 3 *2 0 )h249f00)] = h95217c. This was meant to illustrate that an error in the OCR can cause an error in the calculation of the FSR. Example 3 Realizing the mistake in Example 2, the user properly zeroes the input (but has a system offset of 5mV), and then runs the same SYSOCAL and SELFGCAL. Using Equation 8, the OCR = (0.005/1.25)*(.75*200 3 *2 0 ) = d24000 = h005dc0. Then the SELFGCAL internally switches in the reference and calibrates the gain. Using Equation 7, the FSR = [(2451)/(.75*2003*20)] = h1fffffffffff/h5b8d80 = h597a7e. 4 Conclusion For most cases, the user should not have to bother with details of how and why calibration works. These parts were designed to have a simple calibration through a few select commands. However, it is important to understand where these calibration coefficients come from when things are not working as expected. Calculations deriving the OCR and FSR register contents can help debug problems as they arise. Also included with this Applications Note are a few general notes on calibration that the user should consider when using these parts, as well as a glossary of important terms used in this document. Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218 7

5 Calibration Notes Here are a few notes on calibration that may be helpful in using the ADS1216, ADS1217 or ADS1218. 1. Calibration must be done to account for changes in the decimation ratio. The gain of the digital filter varies with the decimation ratio. Therefore, if the decimation ratio changes, the digital filter gain changes. The FSR value is then off from the last calibration, yielding the wrong gain. Similarly, the offset is affected by changes in the calibration. 2. PGA changes require a calibration. This change benefits offset calibrations more. In higher gains, the FSR value from a gain calibration may be subject to more noise. See the appropriate datasheet for noise in measurement in different PGA gains. 3. Temperature changes may require a calibration. This becomes important if the drift performance is important. The input offset, reference voltage, and gain error can all be influenced by the temperature. 4. Power supply changes may require a calibration. This is likely to change the same parameters that temperature does. 5. Calibration for either offset or gain requires 7t data periods. This is for either a self or a system calibration. A SELFCAL command will require the part to go through a SELFOCAL and a SELFGCAL, requiring 14t data periods. 6. The input buffer can affect a system gain calibration. Since the system calibrations use the same lines as the analog inputs, this is subject to the same restrictions. If the input buffer is on, and V REF is sampled for the SYSGCAL, the signal should be within the input operating range of the buffers. That is, V REF should be between AGND0.05V to AVDD1.5V. 7. Using the auto mode or sinc 3 filter is best for calibration. Calibration will take time, regardless of whatever filter is used. Since the sinc 3 filter is the least noisy, it is best to use that for calibration; once you get the best values for the OCR and FSR, then switch back to whatever filter you decide to use for reading data. 8. The PGA Offset DAC (ODAC) can affect calibration. The ODAC shifts the input to the PGA by as much as half of the full scale input range. This input shift can affect the calibration of the part by appearing as an offset error, and should be set after calibration. 8 Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218

6 Glossary A Exponential factor used to calculate the DFG DFG Digital Filter Gain DOR Data Output Register DR Decimation Ratio FSR Full Scale Register MSB Most Significant Bit OCR Offset Calibration Register ODAC Offset DAC SELFCAL SelfCalibration in which a SELFOCAL is run and then a SELFGCAL is run SELFGCAL SelfGain Calibration SELFOCAL SelfOffset Calibration SYSGCAL System Gain Calibration SYSOCAL System Offset Calibration 7 References ADS1216 Product Data Sheet (SBAS171B) ADS1217 Product Data Sheet (SBAS260) ADS1218 Product Data Sheet (SBAS187) Calibration Routines and Register Value Generation for the ADS1216, ADS1217 and ADS1218 9

IMPORTANT NOTICE Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TI s terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TI s standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding thirdparty products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions: Products Applications Amplifiers amplifier.ti.com Audio www.ti.com/audio Data Converters dataconverter.ti.com Automotive www.ti.com/automotive DSP dsp.ti.com Broadband www.ti.com/broadband Interface interface.ti.com Digital Control www.ti.com/digitalcontrol Logic logic.ti.com Military www.ti.com/military Power Mgmt power.ti.com Optical Networking www.ti.com/opticalnetwork Microcontrollers microcontroller.ti.com Security www.ti.com/security Telephony www.ti.com/telephony Video & Imaging www.ti.com/video Wireless www.ti.com/wireless Mailing Address: Texas Instruments Post Office Box 655303 Dallas, Texas 75265 Copyright 2003, Texas Instruments Incorporated