I need help immediately with ads7813.
i use arduino 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;
} }