• 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 spi communication not working
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 3 days 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 11 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 18 days ago
    by Bruce Trump
    Chopper op amps offer very low offset voltage and dramatically...

ads1118 spi communication not working

ads1118 spi communication not working

This question is answered
peter krkoc
Posted by peter krkoc
on Jul 08 2012 09:55 AM
Prodigy90 points

Hi,

I have the exact problem with spi communication that is answered here: http://e2e.ti.com/support/data_converters/precision_data_converters/f/73/t/157512.aspx

With the exeption that Bellinger's problem went away when he trided with a fresh chip. I'm at number 3 and I get the sam scope output as he did over and over again. With the exeption that my DIN does not go tristate. I also measure straight from the pins.

It does not matter wheather I got the DIN connected or not, as long I connect the SCLK I get the same output.

Please help me out .

Kind regards

Peter

1118
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Tom Hendrick
    Posted by Tom Hendrick
    on Jul 08 2012 12:08 PM
    Guru86220 points

    Hi Peter,

    Welcome to the e2e Forum!  I'm sorry to hear that you are having trouble with the ADS1118...  Can you tell us if you are using one of our ADS1118EVMs or are you using your own hardware?  If it is your own board, could you post a schematic and perhaps grab some screen shots like Bellinger did?

     

    Regards,

    Tom

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • peter krkoc
    Posted by peter krkoc
    on Jul 09 2012 13:08 PM
    Prodigy90 points

    Hello Tom. Thank you for your response. I will try to explain my setup.

    I am working with my own design as a substrate for the ads1118, which I made for prototyping reasons. It is shown int the figure below. I am using a atmel avr328p to communicate with the chip.(I'm using the popular Arduino board)

    I have the vcc and gnd connected to the regulated  5V (linear regulator) and GND of the Arduino. I've got the AVR running at 16MHz. The CLK, !CS, DI and DO pins are connected to the corresponding pins of the avr that offer hardware support for such communication. I have the spi clock to 16MHz/16 for the  purpose of this mail, but I tried higher and lower speeds as well.Acording to the datasheet all below 4MHz should work.

    I'm using cca 8cm long wires to connect my pcb to the microcontroler's.

    I am cheating and using the arudino SPI library, which is just a wrapper for the avr-libc support for SPI communication. Anyways the signals I'm sending look ok on the scope, I got all the pins soldered seemingly well enough (no shorts at the DIP pins in my design, and all connections form the chip pins to the DIP pins are closed and all the signals look the same weather measured from the 1118's pins or the DIP pins of my breakout board). As I said I made 3 trials (three chips) with same results:

    Here are the schematics and scope printouts:

    WFN10 -> DIP package PCB, nothing remarkable here I hope.

    Here

    I'm here sending msb,lsb,msb,lsb where   msb=0b10000001 and lsb=0b11111010; I tried many different combinatios of OS bits, conversion rates, operation modes...

    I tried reading analog inputs (connected to gnd, 3.3V or 5V) as well as temperature readings. I always get the below bit pattern. Even if I disconect the DIN...which I gues goes low. LEGEND: clock yellow, DIN green

    The result I always get; clock yellow, DOUT green

    Only dout for clarity

    I first thought this was a chip failure and bought two more but judging from the repeatibility of the symtoms I gues it must be sth more systematic.

    Regards and thanks in advance. Please let me know if I need to provide more info.

    Peter

    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 Jul 09 2012 14:02 PM
    Verified Answer
    Verified by peter krkoc
    Mastermind34195 points

    Peter,

    You need to make sure that your data in to the ADS1118 is stable on the negative going side of SCLK, as that is where the data gets latched.  Review Figure 1 of the datasheet.  Adjust your SPI polarity so data transitions on positive going edge of SCLK and remains stable on negative going edge.  One other thing that may not be obvious is CS must remain low throughout the entire communication transaction.

    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.
  • peter krkoc
    Posted by peter krkoc
    on Jul 09 2012 16:15 PM
    Prodigy90 points

    Thank you Bob. I forgot to mention that I have the CS tied to GND all the time. I belive I tried both polarities at some point but I will do that tommorow to be sure.

    Kind regards and thanks for the very prompt help!

    Peter

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • peter krkoc
    Posted by peter krkoc
    on Jul 10 2012 13:38 PM
    Prodigy90 points

    Yes, changing the polarity did the trick. I tried both polarities with the library I was using, but now I noticed that calling the function had no effect. I now changed the SPI control register of the atmega manually and it works! I wish I'd been more systematic in error elimination.

    Thank you very much for helping me!

    Kind regards

    Peter

    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