ADS1256EVM-PDK: Initialization code for the ADS1256.

Intellectual 640 points

Replies: 3

Views: 59

Part Number: ADS1256EVM-PDK

Hello TI,

I am looking for the C code (or any programming language) running on the C55x DSP on the MMB0 board. I am familiar with the C55x DSP and CCS. I just need the source code and the project that contains the code that initialize the ADC.  

I plan to use the ADS1256EVM board in a tester. I have implementing SPI code interface to the ADS1256 via the EVM board J2 connector. Enclosed is the wave form as I issue to reset the device. top 5 signals in white are digital waveform captured. Bottom 5 signals in blue are the same waveform in analog capture.

and below is the reset command done by the C55x on the MMB0 board

I don't know why after I issue the reset command, the DRDY (channel 7) continues to toggle. Also as I follow the same command sequence (captured on the logic analyzer) as the DSP initializes the ADC, I did not get back the same response. I am using SPI mode 1 (CPOL=0, CPHA=1) as implies in the ADS1256 datasheet page 6, figure 1. I tried SPI mode 0 also but I am not able to setup the ADC. I hope that the source code will shed some light on this. 

I also looked for the ADS1256 programming guide of application notes (from a processor's perspective) and I could not find any. Please point me to the URL if these technical artifacts exist.

Thank you,

Sy

3 Replies

  • Hi Sy,

    FYI, none of the images you posted in the last email came through. Can you repost?

    To clarify, are you looking for the EVM source code, or just ADS1256 code in general? We don't have any code to share for the ADS1256 unfortunately, but there is code on the web you might be able to find e.g. https://github.com/adienakhmad/ADS1256. Note that TI cannot verify the usefulness, etc., of this third-party code.

    Also note that TI does not recommend or support using our EVMs in an end-product or design. These boards are intended to evaluate the operation of our devices only.

    -Bryan

  • In reply to Bryan Lizon86:

    Hi Bryan,

    Thank you for your reply.  I plan to use the ADS1256 EVM to implement an internal engineering test equipment. The EVM is not intended to use in a customer product. It is just a quick way for me to use this device without building the board. The goal is to program in Python which runs on an Adafruit FT323H (or a similar board: Arduino Nano) to control the ADS1256.

    The examples code you mention on github only shows basic commands implementation but it does not show how to setup the device uses in different modes. The reason I asked for the C55x code on the EVM is because I am vary familiar with this DSP as well as TI method in writing C code for this processor. I was hoping to read it and convert it to Python code. 

    Anyway, I reverse engineer  the command sequences that the DSP on the EVM kit sends to the ADS1256 upon initialization. I captured the SPI waveform using the Saleae Logic Analyzer (which requires its software to read the waveform). I save the waveform data to CSV file and then convert it to the XLS and use it to do command sequence analysis. This is the same sequence I use to map it to the Python code running on the Adafruit FT323H. I was able to configure the ADS1256 in non-buffered mode and read out the ADC converted value. Enclosed is the XLS file for other people to use. 

    I have 3 questions:

    1. Please confirm that the ADS1256 uses SPI mode 1 : write data and read data on the CLK trailing edge (falling edge).

    2. My problem now is to change the ADS to a buffered mode as well as the offset and gain value.  When I use the ADCPro to enable Buffer mode, then captured the SPI waveform on the logic analyzer: 

        3-byte command (0x50, 0x00, 0x03) then follow on with three separate commands (0xFC), (0x00),  (0xF0). The DSP did not read back what it wrote. 

    In using ADCPro to test the ADS1256, any voltage above 3.8V resulted in saturate at 3.8V but the spec  (SBAS288K − REVISED SEPTEMBER 2013), figute 7, page 15 indicates that it hsould be clamped at 3V. What should I expect?

    3. In my setup using Python and Adafruit FT232H, I generate the similar sequence with similar delay in between each commands. When I read back with command (0x10, 0x00) what I get on the read value is 0xFF.

    What should I expect to see when I read back the Status register? Enclosed is the timing captured.

    Regards,

    Sy

    ADS1256_Enable Buffer_Timing.pdf

    ADS1256_DSP_initialization.pdf

  • In reply to Sy Tran:

    Hi Sy,

    Thanks for your additional info, here are the answers to your questions:

    1. Yes, ADS1256 is mode 1
    2. When the buffer is enabled, the maximum absolute input voltage you should input to the ADC is 3V (using a 5V supply). See page 3 in the datasheet, "Absolute input voltage". The 3V clamp shown in Figure 7 is only engaged when the sensor detect current sources (SDCS) are turned on, which should not be the case for you.
      I also did not see a RREG command in the DSP waveform capture you sent.
    3. If the STATUS byte is in its default state, it should read xxxx 000x. So as long as the last 4 bits are either 1h or 0h, you should be okay.

    Make sure to send the "SDATAC" before reading or writing to registers on the ADS1256. If the device is in RDATAC mode it will ignore these commands. After power-up, I generally recommend sending the "RESET" and "SDATAC" commands first, and then proceeding to configure the registers through register writes

    Let me know if any of these answers help resolve your issues

    -Bryan