ADC counts Calculation for AD7656


Can any one share me the ADC counts calculation for AD7656?I am following 2s compliment technique. Reference we are using is internal(2.5).The input voltage is varying between +-10V.

With regards,

Letheesh G

For eg:If my input signal is square wave of Vpp=2V what will be  my  AD count?
[edited by: Letheesh at 9:21 AM (GMT -4) on 23 Oct 2020]
  • +1
    •  Analog Employees 
    on Oct 28, 2020 12:41 PM 1 month ago


    The datasheet specifies that the LSB weight (table 9) for a 2.5V reference in the +/-10V range as 305uV (0.305 mV).  This is computed as 

    (4*Vref - -4*Vref)/2^16-1 -> (10V--10V)/2^16-1 =  305uV.

    So for a square wave with Vpp = 2V centered around 0V the positive peak of the square wave will be at 1V which should be at code 1V/305e-6 = 3278d or approximately 1/10th of the fullscale value (0x0CCEh).  The negative peak will of course be at -1V which would be equivalent to -3278d or -1/10th of the fullscale value.  This will result in an output code in two's complement format output code of  0xF332h).

    Hope this helps


  • Thanks Sean for the reply .For better understanding I would like yo ask one more thing .Once we get +1V and _1V at the inputs of ADC, Are we going to subtract  the equivalent ADC counts (3278-(-3278) =6556  then do a 2s complement?

    Can you please clarify ?

  • 0
    •  Analog Employees 
    on Oct 29, 2020 11:05 AM 1 month ago in reply to Letheesh


    I'm not sure what you are ultimately trying to do with the captured data so I'm not sure how to answer your question.  The decimal results that we mentioned are already in two's complement format so there is no further need for additional processing.  


  • Hello Sean,

    I was trying to understand how this works . For +1V(the adc count is 3278) and for _1v( the adc count is -3278).Before taking twos complement should we subtract these counts.(3278-(-3278))=6556 .The final adc counts for 2 Vpp is the twos complement of 6556 ?please  correct me if am wrong .



  • 0
    •  Analog Employees 
    on Oct 29, 2020 12:10 PM 1 month ago in reply to Letheesh


    Lets go back to our original problem statement and assume that one cycle of the square wave is captured for every 10 conversions such that we'll have 5 (+1V) readings and 5 (-1V) readings, which in tabular form would look as follows

    Voltage +1 +1 +1 +1 +1 -1 -1 -1 -1 -1
    Output Code (Hex) 0x0CC2 0x0CC2 0x0CC2 0x0CC2 0x0CC2 0xF332 0xF332 0xF332 0xF332 0xF332

    So now if we are looking for the peak-to-peak value then we'll want to do the difference of the maximum value and the minimum value as you indicated in your question above.   The steps we take to implement this in our host are going to depend on how we cast the data (int16, int32, etc.) and on the processor itself so you'll need to consult your manual for the host to be sure.   However assuming that our machine understands that an int16 is a signed 16-bit integer then we can simply perform the arithmetic operation MAX_VAL - MIN_VAL direclty and arrive at the PP_VAL.

    As you correctly showed in your question 3278(0x0CC2)- -3278(0xF332) = 6556 (0x199Ch).  There is no need for any additional manipulation.   However, if your processor doesn't understand int16 you may need to first sign extend your answers to 32 bits (or some other bit depth) for the math to be correct.  

    However if we simply take 6556 and multiply by our LSB weight of 305uV we see a peak to peak voltage of 1.99958V ~ 2V verifying all of our previous math.

    Hope that clarifies