Datenblatt-Suchmaschine für elektronische Bauteile
  German  ▼
ALLDATASHEETDE.COM

X  

ADS131M08IPBSR Datenblatt(PDF) 94 Page - Texas Instruments

Teilenummer ADS131M08IPBSR
Bauteilbeschribung  ADS131M08 8-Channel, Simultaneously-Sampling, 24-Bit, Delta-Sigma ADC
PDF  118 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Hersteller  TI2 [Texas Instruments]
Direct Link  https://www.ti.com
Logo TI2 - Texas Instruments

ADS131M08IPBSR Datenblatt(HTML) 94 Page - Texas Instruments

Back Button ADS131M08IPBSR Datasheet HTML 90Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 91Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 92Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 93Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 94Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 95Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 96Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 97Page - Texas Instruments ADS131M08IPBSR Datasheet HTML 98Page - Texas Instruments Next Button
Zoom Inzoom in Zoom Outzoom out
 94 / 118 page
background image
}
}
/*
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
}
ADS131M08
SBAS950B – OCTOBER 2019 – REVISED FEBRUARY 2021
www.ti.com
94
Submit Document Feedback
Copyright © 2021 Texas Instruments Incorporated
Product Folder Links: ADS131M08



Html Pages

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 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  ...More


Datenblatt Download

Go To PDF Page


Link URL



War ALLDATASHEET hilfreich?  [ DONATE ] 

Über Alldatasheet   |   Werbung   |   Kontakt   |   Privatsphäre und Datenschutz   |   Link zum Datenblatt    |   Linktausch   |   Hersteller
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com