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.

ADS112C04: ADS112C04 single-shot mode read issue's

Part Number: ADS112C04

Hello 

i am able to get the ACK if write a slave address and any other commands from the ADS112C04. every command which i wrote.

steps I am following :

1.reset the ADS112C04 by issuing the below command

<S>0x80 0x06 <P>

2.i am trying in the single-shot mode it is set as default.

3. i am writing to ANI0 by follows

<S> 0x80 0x40 0x81 <P>  // WREG command to set the mux

<S> 0x80 0x08 <P>           // ADC START/SYNC conversion command

Monitor DRDY and wait for DRDY to transition from high to low

<S> 0x80 0x10 <Sr> 0x81 {MSB byte} {LSB Byte} <P>  // RDATA command and data returned from ADC

4.after read command i am sending for AIN1

<S> 0x80 0x40 0x91 <P>  // WREG command to set the mux

<S> 0x80 0x08 <P>           // ADC START/SYNC conversion command

Monitor DRDY and wait for DRDY to transition from high to low 

5.after read command i am sending for AIN2

<S> 0x80 0x40 0xa1 <P>  // WREG command to set the mux

<S> 0x80 0x08 <P>           // ADC START/SYNC conversion command

Monitor DRDY and wait for DRDY to transition from high to low 

6.after read command i am sending for AIN3

<S> 0x80 0x40 0xb1 <P>  // WREG command to set the mux

<S> 0x80 0x08 <P>           // ADC START/SYNC conversion command

Monitor DRDY and wait for DRDY to transition from high to low 

after last channel again i am repeating the step 3 .

But for me DRDY pin is not moving to High to LOW . after 2 or 3 sec's and the read data is alwasy high if i apply 0 v also.

Please help me regards this issue?


Regards,

Naresh reddy

  • Hi Naresh,

    The communication flow in the code appears to be correct.  Have you verified that the register settings are written correctly following the register write?  Do you have oscilloscope or logic analyzer shots of the communication that you can share?

    How are you monitoring DRDY?  Using the default data rate of 20sps, the DRDY will transition from high to low approximately 50ms after the Start command is issued.  This may appear as a pulse so you may need to capture with an oscilloscope of logic analyzer.  I would suggest trying continuous conversion mode just to verify that DRDY pulses after every conversion completes.

    Also, is both AVDD and DVDD at the nominal operating voltage?  And, is the RESET pin pulled high?

    Consider that the conversion output code is in binary 2's complement.  It would not be unreasonable to see 0xFFFF (decimal -1) for a 0V input.

    Best regards,

    Bob B

  • Hello Bob B..

    I tried with continuous conversation mode by writing as below..

    1. <S> 0x80 0x06<P>

    2.now i write the configuration registers as below

    <S> 0x80 0x40 0x81 <P>

    <S> 0x80 0x44 0xCA <P>

    3.now i sent the start/sync command 

    <S> 0x80 0x08 <P>

    4. Now I wait till the DRDY goes from high to low to send the RDATA command

    <S> <0x80 0x10 <Sr><0x81 {__________} {________} <P>

    this flow I am following I would take the DRDY as the input signal to my FPGA.

    whenever DRDY goes high to low i start sending the RDATA command

    sky blue color signal is DRDY. The remaining one is SDA.

    The DRDY signal is looking like below please find the attached image.

    I don't want to try the same in single-shot conversation mode. I don't have time to do experiments on this.

    Please let me know how to switch to other channels in this continues-conversation mode.

    i need to get data for ANI1 by writing 

    <S> 0x80 0x40 0x91 <P>

    <S> 0x80 0x40 0xa1 <P>

    <S> 0x80 0x40 0xb1 <P> for remaining channels . In continuous mode how to stop the current conversation and how to switch to other followed channels. like ANI 1, ANI 2, ANI 3, ANI 0 as repeatedly.

    Regards,

    Nareshreddy

  • Hi Nareshreddy,

    It appears that the communication is working now.  After you read the data from one channel you write the mux change for the next channel.  After you write to the register, the conversion will automatically restart so that the conversion (DRDY falling from high to low) after the mux change will be valid with the newly channel data.  

    However it appears that the SCL speed is around 50kHz.  It may be that the mux write command may not have completed prior to the end of conversion for the previously selected channel.  So you would need to make sure that you do not read the channel data until after the conversion completes for the newly selected channel.  One way to prevent this overlap is to speed the SCL clock up so that both the RDATA and WREG commands take place in less than 1ms time of the conversion.

    The code flow would be the same as the single-shot mode except you would not need to transmit the START command after each channel change.  Sending the START command will not hurt anything as the conversion will restart a second time, but will delay the end of conversion.

    Best regards,

    Bob B

  •  Hello Bob B..

    Now I am able to receive the data from all channels in continuous-conversation mode.

    I applied 3.3 v to all channels. for this, I am getting 0xAB9C  or 43932 decimal value. I want to know how to convert this value to voltage to verify whether whatever we are giving right or wrong.

    i selected External reference selected using the REFP and REFN inputs as reference.

    Gain as 1.

    Please find the attached ADS112C04 connections.

    Please let me know the formula to convert these values to voltage.

    For ANI 0 i am appling 3.3 V

    Regards,

    Nareshreddy

  • Hi Nareshreddy,

    Remember that the output code of the ADS112C04 is in binary 2's complement.  0xAB9C is not a positive value but rather a negative value.  Positive values range from 0x0000 to 0x7FFF (+FS) and negative values range from 0xFFFF (-1 decimal) to 0x8000 (-FS).  The maximum positive code is 32,767 so 43932 is not a valid code.

    I'm confused by your input circuit as I see no place to actually input a voltage.  I assume the input connects to U64 for a gain of -1/2 and then to U45 for a gain of -1.  For a 3.3V input, the output would be 1.65V if I'm correct with respect to the circuitry.

    You are using the analog supply as the reference voltage for a 5V reference.  The value of 1 code or LSB is given in the datasheet as (+/- VREF/Gain) / 2^16.  In your configuration this would be 10V/2^16 for a gain of 1 or approximately 152.6uV per code.  Dividing this number into 1.65V is 10813 codes (0x2A3D).

    There are a few things I noticed in your schematic.  You have AVSS connected to -2.5V through FB22.  But you also have AVSS connected to ground through R76.

    I also noticed that the output of the op amp is directly connected to the analog inputs.  You must be very careful to protect the inputs as the op amps are powered from +/- 5V and if the output should rail the input to the ADS112C04 will exceed the absolute maximum input voltage and most likely will damage the ADS112C04.  I would advise making sure that the maximum current from the op amps through the ADS112C04 inputs is kept to less than 10mA.  This can be achieved by using series resistance.  You may also want to add some caps to create a low-pass filter.

    Best regards,

    Bob B

  • Hello..

    I am writing configuration register 1 with as below

    <S> 0x80 0x44 0xCA <P>

    for ANI 0 i setted as below 

    <S> 0x80 0x40 0x81 <P>

    I am getting the SDA data like below .

    Yello one is SDA

    sky blue is SCL

    The final conversation results am I am getting as 

    0x6A86 in decimal 27270 if i apply ANI0 as 3.3 V (3,3 V is dividing by gain and ADS112C04 is getting 1.65 V)

    if i apply 0 v to the ADC channels ANI 0 to ANI 3 i am getting 0x3FBF in decimal 16369

     For a 3.3V input, the output would be 1.65V if I'm correct with respect to the circuitry. yes your correct IN ADS112C04 ANI 0 I am getting 1.65 V .R76 is DNM (it is not mounted in PCB )

    AVDD is 0+2.5 V

    AVSS is -2.5 V

    Please tell me how to measure negative voltages also.

    One more test I did in this. as below

    <S> 0x80 0x40 0x01 <P>

    and I try to read the data now I am getting the 0x2A3C decimal (10812).

    For this ANI 0 I applied 3.3 V (1.65 V after gain ) and ANI 1 I applied 0 V.

    Please let me know where I am going wrong.

    Regards,

    Nareshreddy.

  • Hi Nareshreddy,

    When you use bipolar analog supplies (+/- 2.5V) and you select a mux setting for AINP = AIN0, AINN = AVSS, note that the measurement is not with respect to AGND but instead AVSS.  So if your input is 1.65V relative to AGND, the output code will reflect the result relative to AVSS (-2.5V).  Code 27270 equates to a measured voltage of about 4.16V above AVSS (-2.5).  To see the result relative to AGND you need to subtract 2.5V. 4.15 - 2.5 = 1.66V relative to AGND.

    In the case of a 0V input (codes 16369), you can see that the output code calculates to about 2.5V.  When you subtract 2.5V you get 0V (2.5 - 2.5 = 0V).  

    When you measure relative to AVSS you will only utilize 1/2 of the full-scale range as AINP will never go lower than AINN and you will never see a negative output code.  If you want to measure above and below AGND, you will need to set one of the inputs to AGND (0V) and measure relative to that input.  

    For example, if you set AIN3 to AGND, you will have 3 inputs that can measure differentially relative to AGND (AIN0/AIN3, AIN1/AIN3 and AIN2/AIN3).  In this way you can measure above and below AGND.

    Best regards,

    Bob B

  • Hello Bob B..

    If I want to measure the voltage between (+/- 2.5V )  if I connect AVSS to Ground will it give negative and positive voltages ranges?

    If ANIP with ANI0 (-1.0 V ) and ANIN (AVSS(ground) ) . will it will give negative voltage ranges?

    Regards,

    Nareshreddy

  • Hi Nareshreddy,

    The input range to the ADS112C04 will be determined by the supply voltage.  The input range for the device is an absolute maximum of AVDD+300mV to AVSS-300mV.  If you connect AVSS to GND, then you are limited with respect to the input range and will not be able to measure voltages below GND.

    You could use your current setup and just add 2.5V to every measurement.  However, using this method limits you to 15bit as you cannot measure in the negative range.

    You could use a unipolar supply and offset the input voltage by 2.5V, but this will have the same effect as the bipolar supply as you will only be able to measure in the positive range.

    If you want to measure +/- voltages you need to use the method I described in my last post.

    Best regards,

    Bob B