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.

TMS320F280049: How to connect an ADC with SPI and multiple data lines

Part Number: TMS320F280049


Hello,

I want to connect a dual synchronous sampling ADC (AD4680) to the TMS320F280049 (Master) via SPI. The ADC has two data output lines. Can I configure the SPI module of the microcontroller in a way to read both data lines simultaneously? Or do I need to connect each data channel to a different SPI module in the microcontroller and synchronize them somehow?

Thank you

Sebastian

  • Hi Sebastian,

    It does look that ADC can support single data line (with somewhat reduced throughput/latency) so if your application can support it you can try just using the SPI at the maximum clock rate (i believe 25MHz); that'll be much easier to implement.

    Otherwise, I think you will need to use two SPI modules.  Say SPI-A as 'master' and SPI-B as 'slave'.  SPI A sends the CS to the ADC as well as a clock and receives data back from ADC SDOA.  SPI B would use the clock and chip select from SPI-A (similar to loopback) but actually take data into the data input line from the ADC SDOB pin.  

    Module A:

    • SPI-A: SIMO --> ADC SDI
    • SPI-A: SOMI --> ADC SDOA
    • SPI-A: CLK --> ADC SCLK and SPI-B CLK       
    • SPI-A: STE (Chip select) --> ADC CS, SPI-B STE

    Module B:

    • SPI-B: SIMO --> ADC SDOB
    • SPI-B: SOMI --> Don't care
    • SPI-B: CLK --> from SPI-A CLK     
    • SPI-B: STE (Chip select) --> from SPI-A STE

    Depending on how fast you operate the interface, you may need to add some intentional delay to the clock going to SPI-B to better match the data coming out of the ADC.

    ---

    I'll also just go ahead and point out that C2000 does have microcontrollers with integrated 16-bit ADCs.  TMS320F28379D and TMS320F28379S families have up to 4 x 1.1MSPS fully differential 16-bit ADCs and TMS320F28388D and TMS320F28388S families have up to 4 x 1.1MSPS differential or single-ended 16-bit ADCs. 

    I think this should be much easier to implement, much lower latency, and probably much lower cost vs using an external ADC.  You can simultaneously sample up to 4 inputs and the ADCs have additional muxed inputs if you need to sample additional signals.  The ADC you selected does have slightly higher SNR and wider common-mode range. 

    Other engineers from TI can also probably recommend TI external ADCs that might meet your application requirements if you post in the data converters forum.  

  • Hello Devin,

    Thank you very much for the answer. Using the second SPI as a slave is a great idea. I want to use an external ADC because it will be placed on a different PCB as the microcontroller, to be closer to the signal source.

    Best Regards

    Sebastian

  • Hi Sebastian,

    Makes sense. 

    For that situation you might take a look at the FSI "Fast Serial Interface" peripheral on F28004x and F2838x devices.  This is used to shuttle data very quickly over longer distances or across an isolation boundary (optoisolator) with skew compensation and automated error correction.  This is used to make distributed control systems like this one: https://www.ti.com/lit/ug/tiduev1/tiduev1.pdf.  Another similar use case for FSI is to treat one or more C2000 devices as a remote "smart ADC" while another c2000 device acts as the host / data aggregator / controller.