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.

[参考译文] TM4C129XKCZAD:ADC 的示例代码

Guru**** 2380860 points
Other Parts Discussed in Thread: TM4C129XKCZAD, EK-TM4C1294XL
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1051961/tm4c129xkczad-sample-code-of-adc

器件型号:TM4C129XKCZAD
Thread 中讨论的其他器件: EK-TM4C1294XL

大家好、

我们的客户不熟悉编程、希望了解如何将 TM4C129XKCZAD 的 ADC 设置为4MHz 采样率。 我已经检查了 Resource Explorer、似乎我们没有 用于 TM4C129XKCZAD 的 ADC 示例代码。 根据我们的客户、他 希望获得1024个样本并将其打印在显示屏(简单示波器)上。 他还想知道是否可以测量负电压?

此致、

Danilo

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Danilo、

    TM4C129XKCZAD 代码将与 TM4C129x 的任何代码相同、它们都具有相同的 ADC 模块。 我们在其中提供了用于 EK-TM4C1294XL LaunchPad 的 ADC_UDMA_pingpong 示例、这是 TivaWare 2.2.0中添加的一个新示例 (这不在 Resource Explorer 上、必须从 TI.com 下载)、我们的通用 ADC 示例位于[安装路径]\TivaWare_C_Series-2.2.0.295\examples\adc peripherals

    如果4MHz 采样率意味着每秒400万个样本、那么这是一个挑战。 TM4C129x 限制为每秒200万个样本。 但是、一位客户发布了一种使用两个 ADC 模块每秒有效获得400万个样本的方法。 这或许可以帮助您的客户: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/699971/ccs-ek-tm4c1294xl-adc-with-dma-ping-pong-mem_buffer_size-limited-to-8/2580498#2580498

    此主题还深入介绍了如何最大限度地提高 ADC 采样率: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/690227/ccs-ek-tm4c1294xl-adc-not-running-at-2msps-capped-at-1msps/2545036#2545036

    [引用 userid="432284" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1051961/tm4c129xkczad-sample-code-of-adc "]他还想知道是否可以测量负电压?

    任何负电压都需要直流失调电压、以确保 MCU 引脚的输入高于 GND。 MCU 将不接受负电压、在潜在 IC 损坏之前的绝对最小值为-0.3V。 如果使用直流偏移、则可以在差分模式下运行 ADC 以处理测量、但除非也使用分压器、否则有效输入范围限制为+1.65V 至-1.65V。

    此致、

    Ralph Jacobi

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Ralph、

    感谢您的回答。 我们刚刚收到了客户的反馈、

    我找不到 ADC_UDMA_pingpong 示例结果。 已获得有关如何显示 UART0信息的任何文档或教程、该信息已连接到虚拟串行端口并以115200、8-N-1运行、用于显示来自此应用程序的消息。 如何获得此消息?

    此致、

    Danilo

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Danilo、

    [引用 userid="432284" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1051961/tm4c129xkczad-sample-code-of-adc/3903633 #3903633"]我找不到 ADC_UDMA_pingpong 示例结果。

    它将位于[Install Path]\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\adc_udma_pingpong

    如果他们没有 TivaWare 2.2.0、则需要下载它。 作为改进的一部分、我们在2.2.0上提供了更好的 ADC 配套资料。

    [引用 userid="432284" URL"~/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1051961/tm4c129xkczad-sample-code-of-adc/3903633 #3903633">已获得有关如何显示来自 UART0的信息、连接到虚拟串行端口并以115,200、8-N-1运行的文档或教程,这些文档或教程用于显示来自此应用程序的消息。 [/报价]

    我不知道我们是否真的有"文档"、但这是在许多 TivaWare 示例上完成的。 最简单的示例是  hello 工程、它位于 :[INSTALL Path]\TivaWare_C_Series-2.2.0.295\examples\boards\ek-tm4c1294xl\hello

    我们拥有的文档更多地介绍了每个 API 的功能以及如何使用它。

    此致、

    Ralph Jacobi