JAJSI11B October   2019  – February 2021 ADS131M08

PRODUCTION DATA  

  1. 特長
  2. アプリケーション
  3. 概要
  4. Revision History
  5. Pin Configuration and Functions
  6. Specifications
    1. 6.1 Absolute Maximum Ratings
    2. 6.2 ESD Ratings
    3. 6.3 Recommended Operating Conditions
    4. 6.4 Thermal Information
    5. 6.5 Electrical Characteristics
    6. 6.6 Timing Requirements
    7. 6.7 Switching Characteristics
    8. 6.8 Timing Diagrams
    9. 6.9 Typical Characteristics
  7. Parameter Measurement Information
    1. 7.1 Noise Measurements
  8. Detailed Description
    1. 8.1 Overview
    2. 8.2 Functional Block Diagram
    3. 8.3 Feature Description
      1. 8.3.1  Input ESD Protection Circuitry
      2. 8.3.2  Input Multiplexer
      3. 8.3.3  Programmable Gain Amplifier (PGA)
      4. 8.3.4  Voltage Reference
      5. 8.3.5  Clocking and Power Modes
      6. 8.3.6  ΔΣ Modulator
      7. 8.3.7  Digital Filter
        1. 8.3.7.1 Digital Filter Implementation
          1. 8.3.7.1.1 Fast-Settling Filter
          2. 8.3.7.1.2 SINC3 and SINC3 + SINC1 Filter
        2. 8.3.7.2 Digital Filter Characteristic
      8. 8.3.8  DC Block Filter
      9. 8.3.9  Internal Test Signals
      10. 8.3.10 Channel Phase Calibration
      11. 8.3.11 Calibration Registers
      12. 8.3.12 Communication Cyclic Redundancy Check (CRC)
      13. 8.3.13 Register Map CRC
    4. 8.4 Device Functional Modes
      1. 8.4.1 Power-Up and Reset
        1. 8.4.1.1 Power-On Reset
        2. 8.4.1.2 SYNC/RESET Pin
        3. 8.4.1.3 RESET Command
      2. 8.4.2 Fast Startup Behavior
      3. 8.4.3 Conversion Modes
        1. 8.4.3.1 Continuous-Conversion Mode
        2. 8.4.3.2 Global-Chop Mode
      4. 8.4.4 Power Modes
      5. 8.4.5 Standby Mode
      6. 8.4.6 Current-Detect Mode
    5. 8.5 Programming
      1. 8.5.1 Interface
        1. 8.5.1.1  Chip Select (CS)
        2. 8.5.1.2  Serial Data Clock (SCLK)
        3. 8.5.1.3  Serial Data Input (DIN)
        4. 8.5.1.4  Serial Data Output (DOUT)
        5. 8.5.1.5  Data Ready (DRDY)
        6. 8.5.1.6  Conversion Synchronization or System Reset (SYNC/RESET)
        7. 8.5.1.7  SPI Communication Frames
        8. 8.5.1.8  SPI Communication Words
        9. 8.5.1.9  ADC Conversion Data
          1. 8.5.1.9.1 Collecting Data for the First Time or After a Pause in Data Collection
        10. 8.5.1.10 Commands
          1. 8.5.1.10.1 NULL (0000 0000 0000 0000)
          2. 8.5.1.10.2 RESET (0000 0000 0001 0001)
          3. 8.5.1.10.3 STANDBY (0000 0000 0010 0010)
          4. 8.5.1.10.4 WAKEUP (0000 0000 0011 0011)
          5. 8.5.1.10.5 LOCK (0000 0101 0101 0101)
          6. 8.5.1.10.6 UNLOCK (0000 0110 0110 0110)
          7. 8.5.1.10.7 RREG (101a aaaa annn nnnn)
            1. 8.5.1.10.7.1 Reading a Single Register
            2. 8.5.1.10.7.2 Reading Multiple Registers
          8. 8.5.1.10.8 WREG (011a aaaa annn nnnn)
        11. 8.5.1.11 Short SPI Frames
      2. 8.5.2 Synchronization
    6. 8.6 Registers
  9. Application and Implementation
    1. 9.1 Application Information
      1. 9.1.1 Unused Inputs and Outputs
      2. 9.1.2 Antialiasing
      3. 9.1.3 Minimum Interface Connections
      4. 9.1.4 Power Metrology Applications
      5. 9.1.5 Multiple Device Configuration
      6. 9.1.6 Code Example
      7. 9.1.7 Troubleshooting
    2. 9.2 Typical Application
      1. 9.2.1 Design Requirements
      2. 9.2.2 Detailed Design Procedure
        1. 9.2.2.1 Voltage Measurement Front-End
        2. 9.2.2.2 Current Measurement Front-End
        3. 9.2.2.3 ADC Setup
        4. 9.2.2.4 Calibration
        5. 9.2.2.5 Formulae
      3. 9.2.3 Application Curves
  10. 10Power Supply Recommendations
    1. 10.1 CAP Pin Behavior
    2. 10.2 Power-Supply Sequencing
    3. 10.3 Power-Supply Decoupling
  11. 11Layout
    1. 11.1 Layout Guidelines
    2. 11.2 Layout Example
  12. 12Device and Documentation Support
    1. 12.1 Documentation Support
      1. 12.1.1 Related Documentation
    2. 12.2 ドキュメントの更新通知を受け取る方法
    3. 12.3 サポート・リソース
    4. 12.4 Trademarks
    5. 12.5 静電気放電に関する注意事項
    6. 12.6 用語集
  13. 13Mechanical, Packaging, and Orderable Information

パッケージ・オプション

メカニカル・データ(パッケージ|ピン)
サーマルパッド・メカニカル・データ
発注情報

Code Example

This section contains example pseudocode for a simple program that configures and streams data from the ADS131M08. The pseudocode is written to resemble C code. The code uses several descriptive precompiler-defined constants that are indicated in upper case. The definitions are not included for brevity. The program works in three sections: MCU initialization, ADC configuration, and data streaming. This code is not optimized for using the fast startup feature of the ADS131M08.

The MCU is initialized by enabling the necessary peripherals for this example. These peripherals include an SPI port, a GPIO configured as an input for the ADS131M08DRDY output, a clock output to connect to the ADS131M08 CLKIN input, and a direct memory access (DMA) module that streams data from the SPI port into memory without significant processor intervention. The SPI port is configured to a 24-bit word size because the ADC default SPI word size is 24 bits. The CS pin is configured to remain low as long as the SPI port is busy so that it does not de-assert in the middle of a frame.

The ADC is configured through register writes. A function referred to as adcRegisterWrite writes an ADC register using the SPI peripheral. No CRC data integrity is used in this example for simplicity, but is recommended. The ADC outputs are initially disabled so short frames can be written during initialization consistent with the guidance provided in the Section 8.5.1.11 section. The ADC is configured to output DRDY as pulses, the gain is changed to 32 for channels 1 and 3, and the DC block filter is used with a corner frequency of 622 mHz. Finally, the ADC word size is changed to 32 bits with an MSB sign extension to accommodate the MCU memory length and to allow for 32-bit DMA transfers. All other settings are left as defaults.

Data streaming is performed by using an interrupt that is configured to trigger on a negative edge received on the GPIO connected to the DRDY pin. The interrupt service routine, referred to as DRDYinterrupt, sends six 32-bit dummy words to assert CS and to toggle SCLK for the length of the entire ADC output frame. The ADC output frame consists of one 32-bit status word, four 32-bit ADC conversion data words, and an optional 32-bit CRC word. The frame is long enough for output CRC even though the CRC word is disabled in this example. The DMA module is configured to trigger upon receiving data on the SPI input. The DMA automatically sends the ADC data to a predetermined memory location as soon as the data are shifted into the MCU through the SPI input.

   
numFrameWords = 10;      // Number of words in a full ADS131M08 SPI frame
unsigned long spiDummyWord[numFrameWords] = 
{       0x00000000,
  0x00000000,
              0x00000000,
              0x00000000,
  0x00000000,
              0x00000000,
              0x00000000,
              0x00000000,
              0x00000000,
0x00000000};    // Dummy word frame to write ADC during ADC data reads

bool firstRead = true;  // Flag to tell us if we are reading ADC data for the// first time
signed long adcData;    // Location where DMA will store ADC data in memory, 
    // length defined elsewhere/*
Interrupt the MCU each time DRDY asserts when collecting data
*/
DRDYinterupt(){
if(firstRead){          // Clear the ADC's 2-deep FIFO on the first read
for(i=0; i<numFrameWords; i++){
SPI.write(spiDummyWord + i);
}
for(i=0; i<numFrameWords; i++){
SPI.read();
}
firstRead = false;  // Clear the flag
DMA.enable();       // Let the DMA start sending ADC data to memory
}
for (i=0; i<numFrameWords; i++){// Send the dummy data to the ADC to get// the ADC data
SPI.write(spiDummyWord + i);
}
}
/*
adcRegisterWrite
Short function that writes one ADC register at a time. Blocks return until SPI
is idle. Returns false if the word length is wrong.
param
addrMask:       16-bit register address mask
data:           data to write
adcWordLength:  word length which ADC expects. Either 16, 24 or 32.
return
true if word length was valid
false if not
*/
bool adcRegisterWrite(unsigned short addrMask, unsigned short data,
unsigned char adcWordLength){
unsigned char shiftValue;       // Stores the amount of bit shift based on 
                                    // ADC word length
if(adcWordLength==16){
shiftValue = 0;             // If length is 16, no shift
}else if(adcWordLength==24){
shiftValue = 8;             // If length is 24, shift left by 8
}else if(adcWordLength==32){
shiftValue = 16;            // If length is 32, shift left by 16
}else{
return false;               // If not, invalid length
}
SPI.write((WREG_OPCODE |     // Write address and opcode
addrMask) << shiftValue);// Shift to accommodate ADC word length
                                
SPI.write(data << shiftValue);// Write register data
while(SPI.isBusy());          // Wait for data to complete sending
return true;
}
/*
main routine
*/
main(){
enableSupplies();
GPIO.inputEnable('input');  // Enable GPIO connected to DRDY
clkout.enable(8192000);     // Enable 8.192 MHz clock to CLKIN 
SPI.enable();               // Enable SPI port
SPI.wordLengthSet(24);      // ADC default word length is 24 bits
SPI.configCS(STAY_ASSERTED);// Configure CS to remain asserted until frame// is complete
while(!GPIO.read()){}       // Wait for DRDY to go high indicating it is ok// to talk to ADC
adcRegisterWrite(CLOCK_ADDR,            // Write CLOCK register
ALL_CH_DISABLE_MASK |               // Turn off all channels so short// frames can be written during// config
OSR_1024_MASK | PWR_HR_MASK, 24);   // Re-write defaults for other bits// in CLOCK register
adcRegisterWrite(MODE_ADDR,             // Write MODE register
RESET_MASK | DRDY_FMT_PULSE_MASK |  // Clear the RESET flag, make DRDY// active low pulse
WLENGTH_24_MASK |                   // Re-write defaults for other bits
SPI_TIMEOUT_MASK, 24;               // in MODE register
adcRegisterWrite(GAIN1_ADDR,            // Write GAIN1 register
PGAGAIN3_32_MASK |                  // Set channels 1 and 3 PGA gain to
PGAGAIN1_32_MASK, 24);              // 32 in this example// Leave channels 0 and 2 at default// gain of 1
adcRegisterWrite(THRSHLD_LSB_ADDR,      // Write THRSHLD_LSB register
0x09, 24);                          // Set DCBLOCK filter to have a// corner frequency of 622 mHz
DMA.triggerSet(SPI);// Configure DMA to trigger when data comes in// on the MCU SPI port
DMA.txAddrSet(SPI.rxAddr());// Set the DMA to take from the incoming SPI
// port
DMA.rxAddrSet(&adcData);// Set the DMA to send ADC data to a predefined
// memory location
adcRegisterWrite(MODE_ADDR,             // Write MODE register
WLENGTH_32_SIGN_EXTEND_MASK |       // Make ADC word size 32 bits to// accommodate DMA
DRDY_FMT_PULSE_MASK |               // Re-write other set bits in MODE
SPI_TIMEOUT_MASK, 24);              // register
SPI.wordLengthSet(32);                  // Set SPI word size to 32 bits to// accomodate DMA
adcRegisterWrite(CLOCK_ADDR,            // Write CLOCK register
ALL_CH_ENABLE_MASK |                // Turn on all ADC channels
OSR_1024_MASK | PWR_HR_MASK, 32);   // Re-write defaults for other bits// in CLOCK register
GPIO.interuptEnable();// Enable DRDY interrupt and begin streaming data
}