I use TI28335 + ADS1262EVM (serial/power interface connected) , and try to read the values of 4 sets resistors (1k,1k, 10k,10 respectively)
the circuit:
I use DRDY pins and interrupt routine to deal with the condition that the converted data is ready
use IDAC1 = 50 uA, and switch IDAC source among AIN3, AIN5, AIN7, AIN9 after each reading in ISR.
My question is the IDAC current source switch need additional time to settle down? how long?
If I initialize ADS126x with longest DELAY time 8.8ms, the readback resistor value is correct.
but if I use shorter delay time than 8.8ms, the resistor value is not correct..
any hint??
I initialize the ads1262 with the following parameters
set_adc_START(0); ADS126xReadRegister(ID, ADS126x_NUM_REG, AdcRegData, TARGET_ADC1); //Read ALL registers WriteRegData = (AdcRegData[MODE0] & ~DELAY_MASK & ~RUNMODE) | DELAY_8800us; //MODE0 ADS126xWriteRegister(MODE0, 1, &WriteRegData, TARGET_ADC1); //Configure Delay time WriteRegData = (AdcRegData[MODE1] & ~FILTER_MASK) | FILTER_SINC4; //MODE2 ADS126xWriteRegister(MODE1, 1, &WriteRegData, TARGET_ADC1); //Configure Digital Filter WriteRegData = (AdcRegData[MODE2] & ~DR_MASK) | DR_7200_SPS; //MODE2 ADS126xWriteRegister(MODE2, 1, &WriteRegData, TARGET_ADC1); //Configure ADC1 data rate WriteRegData = MUXP_AIN3 | MUXN_AIN2; ADS126xWriteRegister(INPMUX, 1, &WriteRegData, TARGET_ADC1); //Configure INPMUX WriteRegData = MUX2_NO_CONM | MUX1_AIN3; //IDACMUX (IDAC1MUX = AIN3) ADS126xWriteRegister(IDACMUX, 1, &WriteRegData, TARGET_ADC1); //Configure ADC1 data rate WriteRegData = MAG2_OFF | MAG1_50uA; //IDACMAG (IDAC1MAG = 50 uA) ADS126xWriteRegister(IDACMAG, 1, &WriteRegData, TARGET_ADC1); //Configure ADC1 data rate g_curSetting_ADC1 = THERMISTOR_SET_1; WriteRegData = RMUXP_AIN0 | RMUXN_AIN1; //REFMUX (REFP = AIN0, REFN = AIN1) ADS126xWriteRegister(REFMUX, 1, &WriteRegData, TARGET_ADC1); //Configure ADC1 data rate ADS126xReadRegister(ID, ADS126x_NUM_REG, AdcRegData, TARGET_ADC1); //Read ALL registers Check Written Values
Interrupt routine:
set_adc_CS(0); ADS126xXferByte(RDATA1); //Send RDATA1 command for(i = 0; i < 6; ++i) ADC_Bytes[i] = ADS126xXferByte(0); set_adc_CS(1); if (ADC_Bytes[0] & ADC1_NEW) { //ADC1 Data New? ADC_Data_Only = ((long)ADC_Bytes[1] << 24) | //Data MSB ((long)ADC_Bytes[2] << 16) | ((long)ADC_Bytes[3] << 8) | ((long)ADC_Bytes[4] << 0); //Data LSB unsigned char mag = MAG1_50uA; //switch to next set of resistor ADS126xSendStopCommand(TARGET_ADC1); ADS126xWriteRegister(IDACMAG, 1, 0, TARGET_ADC1); //OFF IDAC WriteRegData = MUXP_AIN5 | MUXN_AIN4; ADS126xWriteRegister(INPMUX, 1, &WriteRegData, TARGET_ADC1); //Configure INPMUX WriteRegData_2 = MUX2_NO_CONM | MUX1_AIN5; //IDACMUX (IDAC1MUX = AIN3) ADS126xWriteRegister(IDACMUX, 1, &WriteRegData_2, TARGET_ADC1); //Configure ADC1 data rate ADS126xWriteRegister(IDACMAG, 1, &mag, TARGET_ADC1); //IDAC1 50 uA
ADS126xSendStopCommand(TARGET_ADC1); //start again after configuration
}