Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

ADS1256: How to configure RDATAC

Part Number: ADS1256

Hi team,

I am currently encountering challenges while attempting to continuously read data with the specified ADC. In my application, the device successfully performs measurements cycling with different inputs. However, during a specific event, I need to read a particular input continuously and sample at a specific rate (1k S/s). The issue I am facing is that every time this event occurs, I set the register to RDATAC mode, but the measurements returned consist of random values that are not related to the actual measurements I am trying to obtain.

I captured some scope shots, and I observed that these unusual values are present in the MIMO bus. Therefore, they are not attributed to any form of noise in my communication system.

To enable RDATAC mode, I am configuring four registers and utilizing three commands. The registers include STATUS (enabling the input buffer), MUX (setting +AIN6 and -AIN7 as differential inputs), ADCON (for unity gain), and DRATE (for sampling at 2k S/s).

Attached is the scope shot for your reference.

After writing these registers, a delay of 2ms is introduced. Subsequently, the commands RDATAC, SYNC, and WAKEUP are executed in this sequence, each separated by a 2ms delay.

 

After this initialization, I utilize the RDATA command whenever a DRDY (Pin) external event occurs, storing the returned values in a buffer with a size of 1000. Despite setting the DRATE for 2k S/s, I consistently receive one measurement every 1ms (strange behavior but not a problem).

Here is a table displaying the returned values, along with the scope shot of the first measured value (Cap_Sample[0]).

The expected measurement is a capacitive discharge (100nF in parallel with 1MOhm) with an initial value of approximately 0.156V.

Can you help me find what I am doing wrong?

  • Hi Lucas Rosa,

    As an FYI, there is no need to issue the RDATA command if you are using RDATAC mode. The whole purpose of RDATAC mode is that as soon as you start issuing SCLKs, the ADC outputs data.

    When you do send the RDATA command as shown below, what are these other commands you are sending on DIN (MOSI)? You should not be sending anything else during the data transaction. These also don't look like valid commands, other than the 0x00 (NOP)

    Can you provide some short psuedo code to help me understand the intended firmware flow? Please do not send the actual code, but just a high level, step by step description of what you are doing. It sounds like you are mixing SDATAC and RDATAC modes, and it is not clear if you are multiplexing through the channels (I assume so, otherwise why would you use an 8-ch ADC)

    -Bryan

  • Hi Bryan,

    Thank you for your assistance. I initially overlooked that the RDATA command was not required for the RDATAC operation. The key resolution was ensuring that the MOSI bus remained low during the MISO transfer. The issue arose from sending random values due to the transmission of non-null dummy data for generating the SCK. I resolved this by deliberately sending 0x00 0x00 0x00, and now the measurements are accurate.

    Once again, I appreciate your help!

  • Hi Lucas Rosa,

    I am glad we could help you resolve this issue quickly!

    -Bryan