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.

• Resolved

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 is msb bit

if(x=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;
} }

ismail

• ok, figured it like this:

___

if(x==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...

ismail

• In reply to ism aaa:

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?

Regards,

Tom

• In reply to Tom Hendrick:

Hi Tom,

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

ismail