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.

I need help immediately with ads7813.

no problem about connections, i just need a code that reads data from adc and convert it to correct values.

so i need to fix these codes:

//below x[0] is msb bit

if(x[0]=1){
for(int j=1, c=16384;j<16;j++,c=c/2)
{
x[j]=~x[j];
val+=c*x[j]; }
val=-val;
}
else{
for(int j=1, c=16384;j<16;j++,c=c/2){
val+=x[j]*c;
} }

• ok, figured it like this:

___

if(x[0]==1){
for(int j=1, c=16384;j<16;j++,c=c/2){
x[j]=~x[j];
val+=x[j]*c;
}

val=3300*val*(double)1/32767;
val+=(float)20;
val=-val;
}

else{
for(int j=1, c=16384;j<16;j++,c=c/2){
val+=x[j]*c;
}
val=3300*val*(double)1/32767;
}

___

but (-)  measurements are very noisy...

• Hi Ismail,

Welcome to our forum!  Have you got everything worked out with the ADS7813?  Can you define 'noisy' for us and perhaps share your raw conversion results for the ADS7813?

• Hi Tom,

I still have a mess with ADS7813, but i work on other thing now. I will write here soon.