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

Hi there!

I had ordered a sample of ADS7813 and tried to get work with an Arduino board. And my problem is i cant get out a better resolution than two decimal place. The first 10 bit seems ok, from MSB, but the last 6 bit is bouncing pell-mell. Here are some conversion results:

 3.25694 10100110101110 3.25694 10100110110101 3.25846 10100110110110 3.25999 10100110111001 3.2609 10100110110101 3.2609 10100110111000 3.2609 10100110110001 3.26579 10100110110100 3.25999 10100110110100 3.25663 10100110110001 3.25266 10100110110100 3.25663 10100110110101 3.25938 10100110101100 3.2609 10100110110110

The first column values is in voltage the second columns values is the conversion result.

I bulid the circuit in a bread-board i used the same capacitors as in the datasheet i tried another input values and i got the same results.

here is my code in Arduino (same as C):

digitalWrite(CLOCK,LOW);

digitalWrite(CONV,LOW);

//this start the conversation

delayMicroseconds(1);

digitalWrite(CONV,HIGH);

while(busy==0){                               // while BUSY is high still wait

}

for(int i=0;i<16;i++){                  //here start the read of the 16 bit

digitalWrite(CLOCK,HIGH);

delayMicroseconds(20);

digitalWrite(CLOCK,LOW);

}

for(int j=1, c=16384j<16;j++,c=c/2){                   //this is how i piece together the 16 bit data in decimal, 15bit because the firs is the sign bit

val+=x[j]*c;

}

val=5*val*(double)1/32767;           //this is how i convert the number to voltage with +-5V input range
What did i mess up?
Cheers
Robert
• Hi Robert,

Could you possibly post a schematic showing your connections to the ADS7813?  The 'C' code is really not going to impact the last 6 LSBs toggling, that would be caused by you power, reference and/or the actual analog input circuitry.

Regards,

Tom

• In reply to Tom Hendrick:

Here is the wiring diagram:

I used the USB power i dont use any adapter. I tried a battery in place of the potentiometer and i got a same result.

Best regards

Robert

• In reply to Tom Hendrick:

Hi again,

So no one can help me?

Robert

• In reply to Robert Katona:

Hi Robert,

Take a look over these articles:

Regards,

Tom

• In reply to Tom Hendrick:

I try to use these codes but it dont work, i need immediately help.

thanks.

ismail