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.

Interfacing multiple ADS1258 with MSP430F5529

Other Parts Discussed in Thread: ADS1258, MSP430F5529

Dear TI Community,

I would like to connect many ADS1258 to a MSP30F5529 to get a high channel count daq device. My primary goal is increase the channel count as possible and get about 500Hz sampling rate (with averaging).

For this purpose I have selected a F5529 controller. I have experience in interfacing a single ADS1258 over SPI (with a NETMF device)  but not with microcontroller. In order the get a higher sampling rate, I choose a F5529 for data acquisition and also a data dispatcher for the next HW level.

I think the communication with ADS and MSP430 will be fine, but  how to stream the acquired data forward to a more intelligent device this is new for me. I suppose there should be a buffer on the MSP430 side and UART could be used for data forwarding. Whan communication protocol should I use for the higher level? 

Could you suggest me a design, or some kind of sw pattern (or even an example code) that I could study how to implement this data forwarding? What is the most appropriate way? Should I use Flash? What are the bottle necks in this development? 

Thank you for your answers,

  • Hi Daniel,

    You might try asking this question in the MSP430 Forums as well...

    My experience with streaming data has been using the MSP430F5529's built in USB peripheral. I find the USB communication to be the main bottleneck when trying to stream data at high data rates, as there are usually multiple devices sharing the USB communication to a PC (for example).

    I would recommend using interrupts to the MSP430 to indicate when to fetch ADC data from the SPI interface, and when the USB peripheral is free to transmit additional data. The first interrupt would capture data to memory, and the second interrupt would dump data onto the USB port. The goal being to have both peripherals operating simultaneously, with minimal processing delay between operations. However, this is not my area of expertise.

    How many channels are you after?
    There is a limit to the SCLK frequency for the ADS1258 and that will limit the number of channels and the overall throughput. I can help you figure out if this part of the communication is feasible!

    Best Regards,
    Chris

  • Dear Chris,

    Nice to see you again! :)

    The theoretical maximum is 32 Channel with 200-500Hz rate; if two MSP430 is required no problem. I agree with interrupts but for the communication I prefer chose SPI or UART maybe. I am going to stream the data to a NETMF device that can easily handle UART or SPI.

    What do you think about the channel count and speed? Do you think F5529 is the right device for my project? I am curious about your opinion. 

    I will post my quest to the MSP430 forum as you suggested.

  • Hi Daniel,

    Good to see you again too!

    I don't see a problem with the SPI communication timing. In auto-scan mode running at the fastest data rate of 23.74kSPS (which is 23.74kSPS / 16channels or 1.48 kSPS per channel), you'll have 42us to read the ADC data between conversions.

    SCLK can be 1/2 the MCLK frequency; therefore, it will take roughly 36 clock cycles or 4.5us to clock out the data (It should only take 32 clock cycles for the status and data bytes; however, I included some extra time for headroom).

    This leaves sufficient time to read data from two concurrently converting ADS1258's with just one MSP430.

    The MSP430F5529 will easily be able to output a 8 MHz SCLK and the 16 MHz MCLK (should you choose to use an external MCLK).


    Regarding sending data to your NETMF, I'd be concerned if UART would be able to keep up. From what I found, the MSP430F5529's UART can handle 460,800 baud (the datasheet says 1M baud, but I don't see that configuration listed in Table 34-5 of the User's Guide). If my understanding is correct, 460,800 baud = 1 bit per 2.17 us, so transmitting 32 bits will not complete before the next ADC conversion.

    On the other hand, SPI is faster. If the receiving device can keep up with the SPI speed, you could transmit data just about as fast as you read it from the ADC (assuming you don't convert data to ASCII, which would require additional bytes to transmit).

    The main thing to look out for is how much processing time you use between reading and transmitting data. If you can read & transmit data concurrently, all 32 channels of data could be read/sent in about 10 us. This leaves about 30us for processing.

    ...That is my guess on your timing requirements!

    Best Regards,
    Chris

  • Dear Chris, 

    Sorry for my late reply. I've been studying F5529 & CCS to get a better overview about this topic.

    "The MSP430F5529 will easily be able to output a 8 MHz SCLK and the 16 MHz MCLK (should you choose to use an external MCLK)." - You mean, the MSP430 will generate the 16Mhz clock for the ADC and 8Mhz for SPI master clk? Sorry for my newbie questions but I am really new in this area.

     Right now I am focusing on MSP430 and clock generation..

    Thank you for you help. I will come back when I am ready with MSP430. :) 

    Cheers,

  • Hi Daniel,

    The MSP430 has 1 or 2 external crystal oscillators used to derive the internal system and peripheral clocks.There are some pins with special functions that can output these internal clocks...

    The SPI clock will be configured when you initialize the SPI peripheral (uses P3.2).

    SMCLK can be an output on P2.2.

    MCLK can be an output on P7.7.

    It is a good idea to output these clocks while testing the MSP430 initialization code. You can probe these clocks on an oscilloscope to make sure your initialization code is working as expected!

    Best Regards,
    Chris