Post Go back to editing

AD7770 Transfer function

Hi

 

AD7770 ADC data can be read by the following table given in datasheet

 

Please let us know how can we calculate the ADC digital output code for the different voltage levels(2.1168V, 2.16V, 2.2032V)

As per our design we are external Vref of 3.3V

Please provide the digital output code for the full scale range of 3.3V

Thanks and Regards

Abishek V

Parents
  • Hi Abishek

    The following function is the one I am currently using and it seems to work properly.  

    ref= value of the reference

    raw_code= the 24bits data

    voltage= pointer where the calculated voltage is stored.

    void ad7771_data_to_voltage(double ref, uint32_t *raw_code, double *voltage)
    {
    if((*raw_code <= 0x7FFFFF) && (*raw_code >= 0x00))
    {
    *voltage = (double)(*raw_code * (ref/16777216.0));
    }
    else
    {
    *voltage = (double)((*raw_code * (ref/16777216.0))-ref);
    }
    }

Reply
  • Hi Abishek

    The following function is the one I am currently using and it seems to work properly.  

    ref= value of the reference

    raw_code= the 24bits data

    voltage= pointer where the calculated voltage is stored.

    void ad7771_data_to_voltage(double ref, uint32_t *raw_code, double *voltage)
    {
    if((*raw_code <= 0x7FFFFF) && (*raw_code >= 0x00))
    {
    *voltage = (double)(*raw_code * (ref/16777216.0));
    }
    else
    {
    *voltage = (double)((*raw_code * (ref/16777216.0))-ref);
    }
    }

Children