This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hai All,
I configured the ADC1015 config register to 0x4080 as shown below which had continuous conversion mode enabled. Next I continued to read the conversion register periodically , but the all the registers goes to default value ( config reg : 0x8385 ) after applying to the voltage to the analogy pin. It looks like it is performing a single conversion and entering power down state.
uint16_t config = ADS1015_REG_CONFIG_CQUE_1CONV | // Comparator enabled and asserts on 1 match
ADS1015_REG_CONFIG_CLAT_NONLAT | // Latching mode
ADS1015_REG_CONFIG_CPOL_ACTVLOW | // Alert/Rdy active low (default val)
ADS1015_REG_CONFIG_CMODE_TRAD | // Traditional comparator (default val)
ADS1015_REG_CONFIG_DR_1600SPS | // 1600 samples per second (default)
ADS1015_REG_CONFIG_MODE_CONTIN; // Continuous conversion mode
config |= ADS1015_REG_CONFIG_MUX_SINGLE_0;
Regards,
James A
Hi James,
Have you confirmed that you are correctly writing to the device in the first place? What do you read back after first writing to the device? Maybe a scope shot of the I2C lines would be helpful here as well.
Regards,
Aaron Estrada
Hi Aaron,
I tried setting the config register to 0x4680 and when I read it back i was getting 0x4600 , only the Data rate is not getting updated. After apply the voltage to analogy pin AIN0 , it is getting back to 0x8385
Regards,
James A
Hi James,
Can you please share a schematic and oscilloscope capture of the I2C read and write transactions? The data rate register is a 1 by default so it sounds like it is getting updated but just to a different value. Also, when you apply voltage to AIN0, are you reading 0x8385 or 0x8583? The default state of the config register is 0x8583.
Regards,
Aaron Estrada