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.

ADS1299 interface with EK-TM4C123GXL

Other Parts Discussed in Thread: ADS1299, EK-TM4C123GXL, TM4C123GH6PM

Sir,

I am trying to interface an ADS1299 with a EK-TM4C123GXL Launchpad (Master).

          I have proceeded in the same way as per the flowchart given in the datasheet of ADS1299 (under SETTING THE DEVICE FOR BASIC DATA CAPTURE to set the ADS registers for acquiring the test signals.

I have configured SSI0 (Master mode) in TIVA and connected the following pins:

SSIClk (Tiva) - SCLK (ADS)

SSIFss (Tiva) - CS (ADS)

SSITx (Tiva) - DIN (ADS)

SSIRx (Tiva) - DOUT (ADS)

The flow which I have adopted is given below within the main():

1) CLKSEL= 1 (Internal Clock) (Given from a GPIO pin from TIVA)

 delay of 1 s (for system to wake-up)

2) /PDWN and /RESET =1 (Given from a GPIO pin from TIVA)

 delay of 1 s (for Power-On Reset)

3) Issue Reset Command (0x06) (SSIDataPut(SSI0_BASE,0x06);)

delay of 18 tclk

4) Issue SDATC Command (0x11)

5) Set config3 reg to E0 (internal ref)

6) Set config1 to 96

7) Set Config2 to D0

( I have verified the reg values being set using the RREG command)

8) Set Channel registers to 05 (Test signal with gain=1)

The next step is to give START=1

Should I configure a seperate GPIO Tiva Pin to make Start high at this point or should I isuue the Start command (0x08) ??

I have tried both.

Next is to give the RDATAC (0x10). should I give this in main() or an infinite loop inside the main () ??

I ve been continuously receiving junk values (that too not continuously - just once and less than 27 bytes) and not the required data ( Status bytes (24) + the channel values). And also I am not able receive the SSIClk after this.

Kindly guide me in this interfacing and obtaining the test signal values.

Regards,

Srivibhavan.S

  • Srivibhavan,

    I am moving your post to the correct forum. The Precision Data Converter group will be able to respond.
  • Hello Srivibhavan,

    I would advise you to use caution when using the Tiva FSS output pin when using the Tiva SSI module. When the Tiva conducts a SPI transaction, it will only hold FSS low for the configured length of the SSI data size (that value should be located in one of Tiva's SSI configuration registers) and will only issue as many SCLKs. In many cases (as I believe it is for the TM4C123GH6PM), the Tiva maximum configurable SSI data size is less than the amount of bits which can be expected from the ADC during a conversion. For debug purposes, I suggest you connect a scope to the SPI pins and see if the transaction is taking place how you expect. If it looks strange, post it here and I can help you analyze it.

    To issue more SCLKs, you'll have to initiate successive SPI transfers but then manipulate the data that is shifted into the Tiva SSI data register with each transaction such that you can ultimately store the entire data word from the ADS1299 in whatever data type you'd like; whether it be unsigned 32-bit integers or 16-bit integers or what have you. The problem with the FSS coming high in between each SPI transaction may be solved in one of two ways: if you are not daisy-chaining devices, I recommend you tie CS low permanently on the board and not connect the Tiva FSS pin to anything; if you must use CS to manage multiple devices on the bus, then use a Tiva GPIO as the de fact CS and pull it low before each time you retrieve data.

    Regarding your question about either pulling the START pin high or issuing the START command, either should work. I hope this explanation was clear, please let me know if anything did not make sense or needs clarification.

    Regards,
    Brian
  • Thank you Brian..

    I have tried keeping /CS permanently grounded but I am receiving the same output..
  • Srivibhavan,

    Can you post some scope screen captures of the data you're getting on the SPI?

    Also, I apologize I didn't answer one of your original questions. The RDATAC command only needs to be issued once so you should issue it at the end of startup after the device configuration has been performed but before your data capture loop. If at any other time you need to configure the device again, though, issue the SDATAC command so the register writes are not interrupted by conversions. Once configuration is complete, then issue the RDATAC command once again.

    Brian