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.

ADS1298 Channel Data Reading

Other Parts Discussed in Thread: ADS1298

Hi all,

I only read ECG data on one channel when reading ADS 1298. I read 216 bits via SPI (9 x 24 bits) to a buffer (Uint32 ECGDataSample[9]) and I see the ECG signal only in  ECGDataSample[4] and [6]. I checked my simulator and there is nothing wrong with it. I also checked configuration registers of ADS1298 and nothing seems to be a problem. I added the screen shots for hte consequtive readings from ADS 1298,



Any help will be appreciated, I am in a desperate situation...

Regards. 

  • Hi Ekrem!

    What hardware are you using with the ADS1298?  Is this your own design or are you using our ADS1298ECG-FE board?  Can you provide the configuration register contents to us?

  • Hi Tom,

    Thank you for your fast response. I use ADS1298ECG-FE Board with EVM5515. I use the same configuration came with ADS1298ECG_FE and below is the content.

    Uint32 ADS1298RegVal[28] = {

    //Write register opcode1
    0x0041,
    //Write register opcode2
    0x0018,
    //CONFIG1 0x0001
    0x0082,
    //CONFIG2
    0x0010,
    //CONFIG3
    0x00DC,
    //LOFF
    0x0003,
    //CH1SET (PGA gain = 6)
    0x0000,
    //CH2SET (PGA gain = 6)
    0x0000,
    //CH3SET (PGA gain = 6)
    0x0000,
    //CH4SET (PGA gain = 6)
    0x0000,
    //CH5SET (PGA gain = 6)
    0x0000,
    //CH6SET (PGA gain = 6)
    0x0000,
    //CH7SET (PGA gain = 6)
    0x0000,
    //CH8SET (PGA gain = 6)
    0x0000,
    //RLDSENSP (default)
    0x0006,
    //RLDSENSM (default)
    0x0002,
    //LOFF_SENSP
    0x00FF,
    //LOFF_SENSM
    0x0002,
    //LOFF_FLIP (default)
    0x0000,
    //LOFF_STATP (Read only)
    0x0000,
    //LOFF_STATM (Read only)
    0x0003,
    //GPIO
    0x0000,
    //PACE (default)
    0x0000,
    //RESP (default)
    0x0000,
    //CONFIG4
    0x0002,
    //WCT1
    0x000A,
    //WCT2
    0x00E3,

    };

    Tom, could you please respond to this topic until I figure out the problem with your help? Because after few messages I do not take any response from TI guys which puts my problems unsolved and prevents me to proceed. If you like I can also send my code via e-mail.

    Regards.

  • Ekrem -

    Looking at the first couple lines of your attached info, can you verify the register write opcodes?   We are not sure what the difference is between your two different opcode commands.

    From d/s, page 40...the register write command needs 2 bytes, appears you only have one.  The opcode contains both the starting register location and number of registers to write - 1, so make sure this data is included in the correct form in your code.

    For example - if you wanted to write to write to CONFIG1only, you would need to send the opcode 0x4100 and then your CONFIG1 data.  For writing CONFIG1 and CONFIG2, 0x4101, and then CONFIG1 data, followed by CONFIG2 data.

  • Hi Greg,

    Below buffer values are send respectively which means the configuration registers will be written starting from address of 0x01 and 24 registers (0x0018) will be written. This means that I already have two byte opcode. 

     //Write register opcode1

    0x0041,
    //Write register opcode2
    0x0018,

    By the way, I have already read the values in configuration registers and below is my reading:

    Therefore, there is another problem which I cannot figure out for about two weeks now :(

    Regards.

  • I also tried to skip to configure ADS1298 and just read the data and the result is the same.

  • Ekrem -

    You said you are writing 24 register above (0x18)...you meant to say 25 correct? (I just want to make sure you have enough data, the opcode is number of registers -1).  I am pretty sure this is not the problem, but just wanted to check.

    In the original post, the array that you included is your data you are writing?  If so, it appears there may be a write issue (timing perhaps) since the above post containing the register read back doesn't appear to match you write array (after RLD_SENSP (0x0D)).  You may want to make sure that all the timing and frequencies are what you think they should be; it could be the first bunch of register writes OK, but by the time you get to RLD_SENSN that you get out of sync on the write operation.  You could send us some of your SPI timing so that we can note anything that may be off.

  • Greg Hupp said:

    You said you are writing 24 register above (0x18)...you meant to say 25 correct? (I just want to make sure you have enough data, the opcode is number of registers -1).  I am pretty sure this is not the problem, but just wanted to check.

    Yes, you are right I want to write 25 registers.

    Greg Hupp said:

    In the original post, the array that you included is your data you are writing?  If so, it appears there may be a write issue (timing perhaps) since the above post containing the register read back doesn't appear to match you write array (after RLD_SENSP (0x0D)).  You may want to make sure that all the timing and frequencies are what you think they should be; it could be the first bunch of register writes OK, but by the time you get to RLD_SENSN that you get out of sync on the write operation. 

    I checked again my write register and there is the data:

    //RLDSENSP (default)
    0x0006,

    When I checked my read buffer comReadBuff, it also seems 0x0006, therefore there is not any problem, am I right or missing some point? However you are right that I miss somre configuration data:

    //LOFF_STATM (Read only)
    0x0003,
    //GPIO
    0x0000,
    //PACE (default)
    0x0000,
    //RESP (default)
    0x0000,
    //CONFIG4
    0x0002,
    //WCT1
    0x000A,
    //WCT2
    0x00E3,

    The configuration above are not read correctly!

    Greg Hupp said:

     You could send us some of your SPI timing so that we can note anything that may be off.

    I also want to inspect my SPI communication and see the timing but do not know how. How can I see the communication like the given pictures in Precision Data Converters File section:

    http://e2e.ti.com/support/data_converters/precision_data_converters/m/videos__files/358662.aspx

    Regards.

  • I have corrected the issue about reading command registers, but when I read Device ID with configuration registers, (RREG1 = 0x20, RREG2 = 0x1A) I read 0x52 which should be 0x92. My problem about data reading is getting strange that I always read the data below:

    I am daunted of this SPI reading problem.... Please help me to resolve this.

    Regards.

  • I want to list what I have tried today to solve my problem. 

    1. I checked the configuration read and write operation. I have successfully read the configuration except the Device ID (I have read 52 instead of 92).

    2. I have checked my GPIO initialization just to be sure that START (GPIO4), RESET (GPIO1) and CLKEN (GPIO11) bits are configured to be output. CLKEN:LOW

    3. wait 1 s after RESET is high and send RESET pulse for 500 CPU CLK. (SPI CLK DIV is 100 for device configuration to ensure multibyte operations)

    4. RDATAC opcode is send at the end of the configuration.

    5. CLK Phase and CLK polarity are set properly for CS0 since ADS1298 is connected to CS0. CKPH0: HIGH, CSP0: LOW, CKP0: LOW

    After all I couldn't be able to solve my problem for a long time now and cannot take much help from TI employees, very disappointing. Under these circumstances, it is redundant to ask about our problems in the TI forums. This is not the first that my questions are ignored.

    I believe that this will be my last message to TI forums, I can spend this time to solve the problems my own as always.

    Regards.

  • Ekrem -

    You should use an oscilloscope or logic analyzer to debug your interface...these are pretty standard pieces of equipment used during debug of embedded system development.  The screen captures you saw were taken with a small, portable logic analyzer, but as mentioned an oscilloscope will work as well.  With these, you can very the timing on your interface to make sure that you are meeting all the timing specs from the datasheet.

    You may want to check and verify that you are meeting the decode timing when sending commands to the device.