This thread has been locked.

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

ADS7813 resolution problem

Prodigy 145 points

Replies: 5

Views: 1856

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.2569353 10100110101110
3.2569353 10100110110101
3.2584612 10100110110110
3.2599871 10100110111001
3.2609026 10100110110101
3.2609026 10100110111000
3.2609026 10100110110001
3.2657856 10100110110100
3.2599871 10100110110100
3.2566301 10100110110001
3.2526626 10100110110100
3.2566301 10100110110101
3.2593767 10100110101100
3.2609026 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
   
  busy=digitalRead(BUSY);
 
 }
  
 
  for(int i=0;i<16;i++){                  //here start the read of the 16 bit
 
  digitalWrite(CLOCK,HIGH);
 
  x[i]=digitalRead(DATA);
 
  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:

    Designing SAR ADC drive circuitry, Part I: A detailed look at SAR ADC operation. Analog Zone. Download at: http://www.analogzone.com/acqt0221.pdf

    Designing SAR ADC drive circuitry, Part II: Input behavior of SAR ADCs. Analog Zone. Download at: http://www.analogzone.com/acqt1003.pdf

    Designing SAR ADC drive circuitry, Part III: Designing the optimal input drive circuit for SAR ADCs. Analog Zone. Download at: http://www.analogzone.com/acqt0312.pdf

     

    Regards,

    Tom

  • In reply to Tom Hendrick:

    Hi Robert, can you please help me about using ADS7813 with arduino?

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

    thanks. 

    ismail

This thread has been locked.

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.