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.

RTOS/TM4C123GH6PM: ADC acquisition and transfer in real-time

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: EK-TM4C123GXL

Tool/software: TI-RTOS

Hello, I am Sky Kim.

I am using TM4C123, and would like to monitor real-time ADC signal via PC without any loss of data.

In my environment,

1) I acquire 12 bit ADC data signal from two channels (ADC0 and ADC1) with 1Mhz sampling rate

2) I want to transfer the acquired data via USB bulk or serial port (UART) in real-time.

Is there any suitable examples for this situation?

Please answer my question.

Thanks in advance.

-Sky

  • Your expectations are too optimistic. You want to capture 12 bit data on two channels at 1MHz and transmit the data without loss in real time. Your raw data transfer rate would be 24Mbaud and that does not include the overhead. USB 2.0 is 12Mb and UARTs are even slower.
  • Oops, sorry for too optimistic settings.

    I meant that the maximum sampling rate is 1Mhz, and I can use 125khz setting as a minimum setting.
    I describe a summary table for required speed for as below:

    channel bit sampling rate total data (bit)/s total Mbps
    2 12 1Mhz 24000000

    24Mbps

    (3Mbyte/s)

    2 12 125khz 3000000

    3Mbps

    (0.375Mbyte/s)


    In case of the 125khz sampling rate,
    I understood that UART is not suitable, but USB could be possible, right?

    So my question is,
    is there any example or source code which is doing both 125khz ADC acquisition and USB transfer in real-time?

    Thanks in advance,
    Sky.

  • Unfortunately I don't have an example exactly like that. There is an example of using the ADC in TivaWare;
    C:\ti\TivaWare_C_Series-2.1.4.178\examples\peripherals\adc
    There is also an example of doing bulk data transfers using USB:
    C:\ti\TivaWare_C_Series-2.1.4.178\examples\boards\ek-tm4c123gxl\usb_dev_bulk
    Neither of those examples are RTOS based, but could be implemented in TIRTOS.