• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Data Converters » Precision Data Converters » Precision Data Converters Forum » ADS1118, OS - CNV-RDY bit
Share
Precision Data Converters
  • Forum
  • Files
  • E2E Wiki
Options
  • Subscribe via RSS
Check out
The Signal blog
  • $core_v2_blog.Current.Name

    Grounding Principles

    Posted 22 hours ago
    by Bruce Trump
    In a previous blog on supply bypassing , I cautioned that poor...
  • $core_v2_blog.Current.Name

    Handy Gadgets and Resistor Divider Calculations

    Posted 8 days ago
    by Bruce Trump
    Handy gadgets make our engineering life easier—the little...
  • $core_v2_blog.Current.Name

    Chopper Op Amps—are they really noisy?

    Posted 16 days ago
    by Bruce Trump
    Chopper op amps offer very low offset voltage and dramatically...

Forums

ADS1118, OS - CNV-RDY bit

This question is answered
Edwin Baaij
Posted by Edwin Baaij
on Apr 02 2012 08:40 AM
Prodigy50 points

Hi,

What a incomplete ADS1118 datasheet!

Anyway using the ADS1118 for the first time so to begin with a single shot mode temperature read out.

The readout of code snippet below is:

ADS1118: 00,00,3d,93
ADS1118: 0c,24,3d,93

0C24 hex converts to 24.3 degrees celcius which is the temperature within given accuracy.

My question is:

The first readout of the CnfReg is 0x3D93: OS=0 and Cnv_rdy=1: makes sense. The second readout I would expect OS to be '1' and Cnv_rdy=0 thus ready BD92. Instead I read 3D93.

What is going wrong?

Regards,
Edwin.

Code snippet:

                      output_low(En_Spi_ADS1118);
                      i80 = spi_read(0xBD);    //start conversion, mux011, PGA101, single shot
                      i81 = spi_read(0x92);    //rate 128SPS, TEMP, NoPull, valid data
                      i82 = spi_read(0);
                      i83 = spi_read(0);
                      output_high(En_Spi_ADS1118);
                      
                      delay_ms(5); //try to read a non zero b15
                      
                      output_low(En_Spi_ADS1118);
                      i80 = spi_read(0); 
                      i81 = spi_read(0); 
                      i82 = spi_read(0);
                      i83 = spi_read(0);
                      output_high(En_Spi_ADS1118);
                      
                      fprintf(debug, "ADS1118: %x,%x,%x,%x\n",i80,i81,i82,i83);
                      
                      output_low(En_Spi_ADS1118);
                      i80 = spi_read(0);
                      i81 = spi_read(0);
                      i82 = spi_read(0);
                      i83 = spi_read(0);
                      output_high(En_Spi_ADS1118);
                      
                      fprintf(debug, "ADS1118: %x,%x,%x,%x\n",i80,i81,i82,i83);                 



ADS1118 config register sample code
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Luis Chioye
    Posted by Luis Chioye
    on Apr 02 2012 14:11 PM
    Verified Answer
    Verified by Tom Hendrick
    Genius17435 points

    Hello Edwin,

    I apologize for the ADS1118 data sheet troubles.  We realize that there is a problem in the configuration register description and we are in the process of correcting it.

     When reading the value of the configuration register, Bit[15] (OS bit) should always read ‘0’ and when reading the Config register value of  Bit[0] (CNV_RDY_FL ) should always read ‘1’.  Therefore, when reading the Configuration Register, the user should always read:

     ‘0xxx xxxx xxxx x011’

    Where:

    Bit 15 is the OS bit;  You can write '1' to this register to begin a single conversion, however, the read status yields always a '0".

    Bit [0] CONV_RDY_FL should always read "1";  Bits[2:1] NOP registers should always read  '01" or valid data.  The configuration register should always end in '011'..  So I believe you are reading the configuration register correctly.

    When using the device in single-shot mode, after reading the config register (Config LSB always=1); the DOUT will transition low when the data is ready.  If CS is held low, the DOUT/DRDY asserts low indicating new data.  After trigerring a conversion, you may monitor the status of the DOUT pin to know if the conversion result is ready or wait a delay according to the programmed data rate to read the conversion result.

    Thank you for the feedback,

    Best Regards,

    Luis

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Edwin Baaij
    Posted by Edwin Baaij
    on Apr 03 2012 02:01 AM
    Prodigy50 points

    Hi Luis,

    Thanks for the swift response. I think it is more a silicon error that datasheet. An ADC converter which has a non-working conversion busy/ready bits? Strikes me oblivious. Someone has been sleeping

    Anyway, i'll try to deal with this situation and test the presented solution.

    I do have some other questions which are not answered in the datasheet.

    * Converter power-up:

    - are there special precaution apply power-supply to the chip?

    - how long does it take before the converter is ready for action ?

    * System performance

    - nonlinearity is specified at 8SPS; what about 860SPS? Far worse?

    Best Regards,

    Edwin

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Luis Chioye
    Posted by Luis Chioye
    on Apr 03 2012 15:48 PM
    Genius17435 points

    Hi Edwin,

    As most A to D converters, it is recommended to use bypass capacitors in close proximity to the device supply pin.  The datasheet recommends 0.1uF capacitors. This capacitor may  help attenuate noise present in the supply and also helps to provide for current bursts needed when the device is converting.  The other general precaution is to not drive the voltage supply (or any of the pins) above 5.5V from GND.  .

    At power up, the device is by default in power down state mode where the PWDN bit in the config register is set to '1'.  Provided the AVDD pin is already settled in the operating voltage range, the user could start a conversion by writing the configuration register.  The serial interface timing requirements are given in figure 1.

    Figure 13, on page 8 of the datasheet shows the INL performance of the device vs data rate.  The INL error distribution is typically less than 8ppm at 860SPS.

    Best Regards,

    Luis

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Edwin Baaij
    Posted by Edwin Baaij
    on Apr 24 2012 01:23 AM
    Prodigy50 points

    Hi Luis,

    Bypass cap is of course taken care of. For now the internal temperature sensor can be read. In the near future a lot more needs to be done with this converter. We are going to use it in series production.

    - What is the roadmap for this converter in fixing this silicon bug?

    Regards,
    Edwin

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Bob Benjamin
    Posted by Bob Benjamin
    on Apr 24 2012 10:08 AM
    Mastermind34155 points

    Edwin,

    This is not a silicon bug....the device works as designed.  The problem is strictly in regards to the datasheet.  This was a cut a paste error related to a similar device, the ADS1115.  If you were able to 'poll' the conversion ready flag then it would never work for DOUT/DRDY to respond as DRDY.

    When you read the configuration back, the last bit must be forced high so that DOUT/DRDY will create a transition of states from high to low and signify completion of conversion.  This can be used to trigger an interrupt.  If you want to poll the device, just look at DOUT/DRDY without sending any clocks.  If it is high, conversion is still in progress.  If it is low, conversion is complete.  This is actually much faster than reading the configuration.  This is how the part was designed to work.

    Best regards,

    Bob B

    ADS1118
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Ankit Kumar
    Posted by Ankit Kumar
    on May 05 2012 10:23 AM
    Prodigy160 points

    Edwin,

    I am not able to understand how 0C24 hex means 24.3 degree Celsius temperature of internal temperature sensor of ADS1118? Could you please explain?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Edwin Baaij
    Posted by Edwin Baaij
    on May 06 2012 02:13 AM
    Prodigy50 points

    Hi Ankit,

    See code below that I use. It's CCS compiler code, but with the comments I think it's readable.

    The function adc_TempReadTrig() return a -signed- integer of 0.1 degrees units. Thus 250 = 25.0 degress, -250 = -25.0 degrees.

    You can use / adapt is as you like.

    void adc_Init() {                      
      // init in single shot temperature conversion at 860 SPS
      // for now init is called after Flash initialisation.
      int8 tmp;
      CKE=0;                                                                        // MCU spi shift out on pos edge
      output_low(En_Spi_ADS1118);
      tmp = spi_read(0x81);    //start conversion, mux000, PGA000, single shot
      tmp = spi_read(0xF2);    //rate 860SPS, TEMP, NoPull, valid data
      tmp = spi_read(0x0);
      tmp = spi_read(0x0);
      output_high(En_Spi_ADS1118);
      CKE=1;                                                                        // MCU spi shift out on neg.edge, change back
    }

    void adc_TempReadTrig() {
      // function presumes that previous trigger was >= 1.5ms ago
      // the conversion ready bits of the ADS1118 do -not- function as status bits (-stupid!-)
      int8 tmp;
      int8 i80, i81;
      int16 i160;
      float f1;
     
      CKE=0;                                                                        // MCU spi shift out on pos edge
      output_low(En_Spi_ADS1118);
      i80 = spi_read(0x81);                                            
      i81 = spi_read(0xF2);
      tmp = spi_read(0);
      tmp = spi_read(0);
      output_high(En_Spi_ADS1118);
      CKE=1;
      i160 = make16(i80,i81);                                                       //make a temperature word
      i160>>=2;                                                                     //undo the 'left justified' format
      if (bit_test(i160,13)) i160|=0xC000;                                          //test sign-bit and if set(negative), and if also set b15&14
      f1  = (float)((signed int16)i160) * 0.03125;                                  //calculate degrees
      adc.iT =  (signed int16)(f1*10);                                              //convert to 0.1degree/lsb integer (250=25.0 degrees) and store it.
    }

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use