• 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 » ADS1298 and Bus Pirate
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 1 day 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

ADS1298 and Bus Pirate

This question is answered
John Green1
Posted by John Green1
on Jul 28 2012 12:15 PM
Prodigy20 points

I know you all as a company don't work with anything as out there as the Bus Pirate, but its a good gadget for interfacing with new chips. I am trying to make sense of the data coming from the ADS1298. I've written all the registers, and read them back to confirm. I'm starting and stopping conversion fine. And I've even coded 0xE into the GPIO registers and set them to output so that the first 24bits on the conversion should read like 0xC0000E (and it does), but all that follow are varying lengths of data. I know that the Bus Pirate variable is one that you can't account for, and indeed the problem may lie there, but assuming for a moment that is functioning as it should, what could I be missing with the chip's config?

[ = CS low

] = CS high

therefore:

[0x11]  #SDATAC

[0x43,0x00,0xC0] # Wreg Config 3 for 0xC0

[0x41,0x00,0x86] # Wreg Config1 for 0x86

[0x42,0x00,0x10] # Wreg Config2 for 0x10

# Here I'm only trying to get a test signal from channel 1 and shorting all the others

[0x45,0x00,0x05] # Wreg Ch1Set 0x05

[0x4[6-c],0x00,0x01] et cetera 

[0x10]

start reading 24+24 Sclocks (Im only doing 24+1*24 because I am only reading one channel. I think this is right per another post)

Normally I dont like to bother you all with stuff that's probably a forehead slapper, but I am running out of summer ...

***EDIT***

I'm getting output like the following:

... 0xC0 0x00 0x0E 0x00 0xC0 0x00 0x0E 0x00 0xB3 0xC0 0x00 0x0E 0x00 0xC0 0x00 0x0E 0x00 0x9D 0xC0 0x00 0x0E 0x00 0xC0 0x00 0x0E 0x00 0xA5 0xC0 0x00 0x0E 0x00 0xB4 0xC0 0x00 0x0E 0x00 0xC0 0x00 0x0E 0x00 0xA8 0xC0 0x00 0x0E 0x00 0xC0 0x00 0x0E 0x00 0xCB 0xC0 0x00 0x0E ...

The 0x0E here is the tail end of the GPIO registers I tagged so I could make sure I was getting the status bytes ... So it looks like Im getting a header 0xC0 0x00 0x0E way too frequently. I would think, with one channel, I should be getting first 24 bits (0xC0 0x00 0x0E) followed by the square wave test signal 24 bits (0xXX 0xXX 0xXX). Or, if my assumption is incorrect, then the status 24 bits followed by 8*24 bits for all 8 channels. 

Thank you in advance,

JG

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 29 2012 09:28 AM
    Guru86200 points

    Hi JG,

    Welcome to the e2e forum!  No Bus Pirates here, but it does look like a handy little tool, I prefer the LogicPort myself.

    If you are able to write/read to/from the ADS1298 registers, I suspect your SPI clock polarity and data phasing is correct.  How fast is your communication to the ADS1298?  I ask because if you deconstruct your data array, it definitely seems like you are not reading out all of the conversion results.  It looks to me like you are getting the status word plus an occasional byte or two of data:

    0xC0 0x00 0x0E 0x00; 0xC0 0x00 0x0E 0x00 0xB3; 0xC0 0x00 0x0E 0x00; 0xC0 0x00 0x0E 0x00 0x9D; 0xC0 0x00 0x0E 0x00; 0xC0 0x00 0x0E 0x00 0xA5; 0xC0 0x00 0x0E 0x00 0xB4; 0xC0 0x00 0x0E 0x00; 0xC0 0x00 0x0E 0x00 0xA8; 0xC0 0x00 0x0E 0x00; 0xC0 0x00 0x0E 0x00 0xCB; 0xC0 0x00 0x0E 

    Are you running the ADS1298 in RDATAC mode?  I suspect you might be and that you are not reading all of the data from the chip between DRDY pulses.  With only CH1 active, you need to send 48 SCLKS, the STATUS will be the first 24-bits and conversion data on the second 24-bits as you noted above.  Do you have an o-scope handy to look at the SPI bus relative to DRDY? 

     

    Regards,

    Tom

    ads1298
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • John Green1
    Posted by John Green1
    on Jul 30 2012 10:13 AM
    Prodigy20 points

    Yes sir, thanks for the welcome. I am running the ADS is RDATAC mode. It seemed like I might have been getting a better result in single-shot mode, but I haven't fully explored this yet. To answer your question apropos speed, I am running the SPI at 4MHz. 

    I noticed the status word plus the random lengths of data too, though I had not thought of your suspicion (that I wasn't managing to read all of the data in between DRDY pulses). 

    If that is correct, and the BusPirate (BP) says that Im at 4MHz, then it seems I have two options: one, move onto the microcontroller I chose and just plow ahead on the firmware under the assumption I am correctly setting the chip up for RDATAC and just exceeding some inherent limitation in the BP; or two, troubleshoot the BP. 

    Maybe something in between those two solutions would be to goto the single-shot mode and try and read an entire conversion or three of the square-wave test signal, just to confirm the reads. 

    I do not have an o-scope :-/ Im a low budget operation. Im in medical school and hope to get into medical device design after I get my medical degree here in a couple years. 

    Thanks for the prompt response and I look forward to hearing your thoughts,

    JG

    Correction: I was clocking at 1 MHz not 4.

    Update: I lowered the clock to 30KHz. The BP only has four options out of the box: 30, 125, 250 KHz and 1MHz. In bitbang mode, which I am scripting in, it can manage 30kHz, 125kHz, 250kHz, 1MHz, 2MHz, 2.6MHz, 4MHz, 8MHz

    Update: I think the clock is my problem. Reading datasheet. For one channel, with default configs otherwise, would I need just 14KHz?

    PS: Sir, does the chip cut out the words for the other channels when you short them (0x01)? i.e., does the formula 24+n*24 vary per chip configuration of channels, or just between chips that lack channels? i.e, does a 8 channel chip ALWAYS read at 24+8*24 bits, or can you lower this on an 8 channel chip? 

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Tom Hendrick
    Posted by Tom Hendrick
    on Jul 31 2012 12:42 PM
    Verified Answer
    Verified by Tom Hendrick
    Guru86200 points

    Hi JG,

    You need the status - that's 24-bits regardless of the chip.  That comes out first followed by data from CH1 to CHx.  If you are only using 2 channels of the ADS1298, assuming they are CH1 and CH2, you need 24-bit * 3 - one status and two data.  If you are using CH7 and CH8, you need 24-bit * 9 - one status and eight data.  Even if a channel is disabled, you still need to provide clocks for that data register. 

     

    Regards,

    Tom

    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