Part Number: ADS1231
Other Parts Discussed in Thread: MSP430F5529
Hello,
I am facing some problems regarding the output codes of the ADS1231. According to Table 3 in the ADS1231's datasheet, I should be receiving a code of 0x00 when there is no weight on the scale. As the weight increases, the code should also increase accordingly. However, based on the results I have obtained (attached below), the outputted codes do not function as intended. The user-specified calibration weight is 216 grams, which I manually inputted into the code. As you can see from the results, once this weight is added to the scale, the output code only changes by 0x14 from the zero code to the calibration code. Subsequently, the step resolution between each outputted code is quite large (since 0x14 = 20, 216/20 ~= 10 grams per step), causing the weight scale to be imprecise. As I add more weight to the scale, the code begins to increase as intended until it reaches a threshold of roughly 500 grams. Once it reaches this weight, however, the code decreases by a relatively significant amount (and the weight becomes negative since the output code is now smaller than the zero code), although it should keep increasing as more weight is added. With enough force on the scale, the code begins to increase again.
To summarize my questions, how can I access a wider range of ADC output codes so the resolution between each digital output is more precise? Does it have to do with the sensitivity of my weight scale platform / load cells? Also, why do the outputted codes start to decrease when a certain threshold is reached, even though they should continuously increase as more weight is added? Finally, why isn't the zero code 0x00?
I've attached the polling code as well as the calibration procedure. Any help is greatly appreciated.

if ((P1IN & 0x08) == 0)
{
while (!(UCB0IFG & UCTXIFG));
UCB0TXBUF = 0x21;
while (!UCRXIFG); // if RX operation is not complete
data1_z = UCB0RXBUF;
while (!(UCB0IFG & UCTXIFG));
UCB0TXBUF = 0x22;
while (!UCRXIFG);
data2_z = UCB0RXBUF;
while (!(UCB0IFG & UCTXIFG));
UCB0TXBUF = 0x23;
while (!UCRXIFG);
data3_z = UCB0RXBUF;
while(!(UCB0IFG & UCTXIFG));
UCB0TXBUF = 0x24;
code_z = (data1_z << 16) + (data2_z << 8) + data3_z + 0x800000;
code_z &= 0x00ffffff;
printf("The zero code is %lx\n", code_z);
}m = weight_c / (code_c - code_z); weight_z = -1 * m * code_z; weight = (m * code) + weight_z;



