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.

ADS130E08: ADS131E08: Need C sample driver code

Part Number: ADS130E08
Other Parts Discussed in Thread: ADS131E08,

Hi,

I'm dealing with this ADC, and I'm using STM32 MCU as the hist CPU, my problem is that I could not configure the Device so I could connect and read registers or converted data from this ADC, So I want to know is there any C code available so I could study it and port it to STM32.

  • Hi,


    This topic comes up occasionally and the only ADS131E08 sample software that I know of is bundled with the ADS130E08EVM-PDK download. I'll reference this post:

    e2e.ti.com/.../769027

    It's not written for the STM32 MCU. Also, it's written for an evaluation module, so the code might be written differently to support different modes of operation. Note that the source is bundled with the ADS130E08EVM download instead of the ADS131E08EVM download.

    Regardless, read through the post, and see if it helps you.


    Joseph Wu

  • Hi,

    I'm checking to see if you were able to download the code used for the ADS130E08/ADS131E08EVM. If you go to the link, you should be able to find the method to download software. This should put a folder on you computer that will have the source code.

    I'll close this post for now, but if you continue to have problems, post back and we can discuss it further.

    Joseph Wu

  • Now the ADS130E08 can read the data, but there are still two problems.,

    1In CMD_SDATAC mode, the write register cannot be written.

    2 one Incorrect value  is always found  in 20 data when reading the conversion result

    973021 bsp_ads130E08.c:1700 15.625478, 20.996735, 13.428144, -9.765924,
    973029 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973035 bsp_ads130E08.c:1699 -14.648885, 4.394666, 21.973324, 35.645618,
    973043 bsp_ads130E08.c:1700 15.625478, 20.996735, 13.916440, -9.521775,
    973051 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973057 bsp_ads130E08.c:1699 -14.893033, 4.150517, 21.729179, 35.401470,
    973065 bsp_ads130E08.c:1700 15.137181, 20.508438, 13.672292, -9.765924,
    973073 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973079 bsp_ads130E08.c:1699 -14.404737, 4.150517, 21.973324, 35.645618,
    973087 bsp_ads130E08.c:1700 15.625478, 20.508438, 13.672292, -9.521775,
    973095 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973101 bsp_ads130E08.c:1699 -14.893033, 3.906369, 22.217474, 35.401470,
    973109 bsp_ads130E08.c:1700 15.625478, 20.996735, 13.428144, -3.662221,
    973117 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973123 bsp_ads130E08.c:1699 -14.648885, 3.906369, 21.729179, 35.401470,
    973131 bsp_ads130E08.c:1700 15.137181, 246.101273, 0.000000, 3996.215576,
    973140 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973145 bsp_ads130E08.c:1699 -14.893033, 121.097450, 0.000000, 3996.215576,
    973154 bsp_ads130E08.c:1700 -3998.901123, 5.371257, 4008.911377, 4004.028564,
    973163 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973168 bsp_ads130E08.c:1699 -14.648885, 4.394666, 22.217474, 35.645618,
    973176 bsp_ads130E08.c:1700 15.869624, 20.752586, 13.916440, -9.765924,
    973185 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973190 bsp_ads130E08.c:1699 -14.893033, 3.906369, 21.973324, 35.401470,
    973199 bsp_ads130E08.c:1700 15.137181, 20.752586, 13.428144, -9.765924,
    973207 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973213 bsp_ads130E08.c:1699 -14.893033, 4.150517, 21.973324, 35.157326,
    973221 bsp_ads130E08.c:1700 15.381330, 20.752586, 13.428144, -9.765924,

  • Hi,

    For this device, can you report back the raw data? This would be the output data digital code that comes from the ADC.

    Based on you output results, I assume that the problem comes here:

    973123 bsp_ads130E08.c:1699 -14.648885, 3.906369, 21.729179, 35.401470,
    973131 bsp_ads130E08.c:1700 15.137181, 246.101273, 0.000000, 3996.215576,
    973140 bsp_ads130E08.c:1697 staus C0, 0, 0, 0
    973145 bsp_ads130E08.c:1699 -14.893033, 121.097450, 0.000000, 3996.215576,
    973154 bsp_ads130E08.c:1700 -3998.901123, 5.371257, 4008.911377, 4004.028564,
    973163 bsp_ads130E08.c:1697 staus C0, 0, 0, 0

    Another thing would be to look at the SPI communication from the ADC. It is possible that you've had some timing issue and you should look at the communication with a logic analyzer or oscilloscope.

    Joseph Wu

  • Hi,

    I haven't heard from you for a while now, so I thought I'd check in again and see if you were able solve the data errors you were getting. In my last post I suggested that you get a logic analyzer or oscilloscope to check the SPI communication to see if this was the problem.

    I'll close this post for now, but if you continue to have problems, read through my email, and post back with some results to help with the debug of this problem.

    Joseph Wu