I am using ADS1241 to convert Thermocouple millivolts to digital data .I disabled the ODAC by writing zero to it and then issued the SELFCAL command. After that I enabled the ODAC with value of 0x83 which is around 16 millivolts. I have 1.235 volt as reference. PGA is 1, bufer is disabled, RANGE bit is zero.
The SELFCAL command is nullifying the effect of ODAC.
The source code is:
offset = 0x00;
ADS1241WriteRegister(ADS1241_ODAC_REGISTER, 1, &offset);
for(j = 0;j < 200;j++);
for(j = 0;j < 200;j++);
for(j = 0;j < 200;j++);
// //self calibration
ADS1241AssertCS(1);
for(j = 20;j > 0;j--);
buf_ads[0] = (ADS1241_SELFCAL);
HAL_SPI_Transmit(&hspi1,buf_ads,1,100);
for(j = 0;j < 20;j++);
//HAL_Delay(100);
ADS1241AssertCS(0);
for (i=0; i<1000; i++);
for (i=0; i<1000; i++);
for (i=0; i<1000; i++);
offset = 0x83;
ADS1241WriteRegister(ADS1241_ODAC_REGISTER, 1, &offset);
for(j = 0;j < 200;j++);
for(j = 0;j < 200;j++);