Other Parts Discussed in Thread: ADS1298
Hello. I have a problem. I apply a voltage of 500mV (reference - 2.42V), I try to change the gain from 1 to 12. I got this result:
Code Gain Output voltage
1738500 1 501,534
2316590 2 334,152
2606407 3 250,638
2779390 4 200,454
2979469 6 143,256
3089434 8 111,408
3207843 12 77,118
3207843 * 2.42 * 1000 / (12 * 8388607) = 77,118mV
I figured out what the gain should be to get ~ 500mV from code 3207843. It is 1.85, not 12.
3207843 * 2.42 * 1000 / (1.85 * 8388607) = 500,227mV
Tell me, please, how correctly to calculate the output voltage?
ADC settings:
CONFIG1 = 0x00
CONFIG2 = 0xA0
LOFF = 0x10
CH1SET = 0x60
CH2SET = 0x20
RLD_SENS = 0x00
LOFF_SENS = 0x00
LOFF_STAT = 0x00
RESP1 = 0x02
RESP2 = 0x83
GPIO = 0x00
After setting up the ADC, I send the command "OFFSETCAL" and make a delay of 20ms:
...
ADC_WriteRegister(ADC_REG_LOFF_STAT, 0x00);
ADC_WriteRegister(ADC_REG_RESP1, 0x02);
ADC_WriteRegister(ADC_REG_GPIO, 0x00);
ADC_SendCommand(ADC_CMD_OFFSETCAL);
Delay10KTCYx(20);
...