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.

[参考译文] TMS320F2800137:F2800137

Guru**** 2486815 points
Other Parts Discussed in Thread: LAUNCHXL-F2800137, SYSCONFIG

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1435933/tms320f2800137-f2800137

器件型号:TMS320F2800137
Thread 中讨论的其他器件:LAUNCHXL-F2800137SysConfig

工具与软件:

尊敬的专家:

我在其中一个 ADC 通道中配置了4个 ADC 引脚(2个通道  A 和 C)、 我根据一个 A 通道引脚" myADC0Result0 "使用 POT 提供模拟输入、我将给出的模拟信号应不同、但该模拟引脚正在影响另一个 ADC 引脚"myADC0Result1"、请帮助我了解该 ADC 引脚为何影响另一个、以便您参考。 我在 LaunchXL-F2800137 (LaunchPad)中使用 SysConfig 完成了所有配置。

谢谢、此致、

Nirdhesh。  e2e.ti.com/.../workspace_5F00_v12-_2D00_-adc_5F00_ex1_5F00_soc_5F00_software_5F00_adc_5F00_ex1_5F00_soc_5F00_software.c-_2D00_-Code-Composer-Studio-2024_2D00_11_2D00_08-17_2D00_13_2D00_39.mp4

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

    Nirdhesh

    您能否提供有关哪些 ADC/通道、SOC、ACQPS 和正在采样的信号类型的更多详细信息?  视频中仅显示 ADC1结果恒定、ADC0逐渐增加。

    此致、

    Joseph

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

    你好、Joseph casuga  

    这里、我将 SOC 0取 为 A0、SOC 1取  为 A1、看到我只是打开 TI 为 ADC_ex1_SoC_SOFTWARE 提供的示例代码 、未在 SysConfig 中进行任何更改、然后使用 A0中连接的电位器信号/输出引脚读取 ADC、我正在旋转计数将0增加至4095 (myADC0Result0)。此处我将正确、但为什么另一个通道是解析、您可以提供原因  

    此致、

    NIRDHESH

    //#############################################################################
    //
    // FILE:   adc_ex1_soc_software.c
    //
    // TITLE:  ADC Software Triggering
    //
    //! \addtogroup driver_example_list
    //! <h1>ADC Software Triggering</h1>
    //!
    //! This example converts some voltages on ADCA and ADCC based on a software
    //! trigger.
    //!
    //! The ADCC will not convert until ADCA is complete, so the ADCs will not run
    //! asynchronously. However, this is much less efficient than allowing the ADCs
    //! to convert synchronously in parallel (for example, by using an ePWM 
    //! trigger).
    //!
    //! \b External \b Connections \n
    //!  - A0, A1, C2, and C3 should be connected to signals to convert
    //!
    //! \b Watch \b Variables \n
    //! - \b myADC0Result0 - Digital representation of the voltage on pin A0
    //! - \b myADC0Result1 - Digital representation of the voltage on pin A1
    //! - \b myADC1Result0 - Digital representation of the voltage on pin C2
    //! - \b myADC1Result1 - Digital representation of the voltage on pin C3
    //!
    //
    //#############################################################################
    //
    //
    // $Copyright:
    // Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/
    //
    // Redistribution and use in source and binary forms, with or without 
    // modification, are permitted provided that the following conditions 
    // are met:
    // 
    //   Redistributions of source code must retain the above copyright 
    //   notice, this list of conditions and the following disclaimer.
    // 
    //   Redistributions in binary form must reproduce the above copyright
    //   notice, this list of conditions and the following disclaimer in the 
    //   documentation and/or other materials provided with the   
    //   distribution.
    // 
    //   Neither the name of Texas Instruments Incorporated nor the names of
    //   its contributors may be used to endorse or promote products derived
    //   from this software without specific prior written permission.
    // 
    // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
    // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
    // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
    // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
    // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
    // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    // $
    //#############################################################################
    //
    
    //
    // Included Files
    //
    #include "driverlib.h"
    #include "device.h"
    #include "board.h"
    
    //
    // Globals
    //
    
    uint16_t myADC0Result0;
    uint16_t myADC0Result1;
    uint16_t myADC1Result0;
    uint16_t myADC1Result1;
    
    
    //
    // Main
    //
    void main(void)
    {
        //
        // Initialize device clock and peripherals
        //
    
        Device_init();
    
        //
        // Disable pin locks and enable internal pullups.
        //
        Device_initGPIO();
    
        //
        // Initialize PIE and clear PIE registers. Disables CPU interrupts.
        //
        Interrupt_initModule();
    
        //
        // Initialize the PIE vector table with pointers to the shell Interrupt
        // Service Routines (ISR).
        //
        Interrupt_initVectorTable();
    
        //
        // Set up ADCs, initializing the SOCs to be triggered by software
        //
        Board_init();
    
        //
        // Enable Global Interrupt (INTM) and realtime interrupt (DBGM)
        //
        EINT;
        ERTM;
    
        //
        // Loop indefinitely
        //
        while(1)
        {
            //
            // Convert, wait for completion, and store results
            //
            ADC_forceMultipleSOC(myADC0_BASE, (ADC_FORCE_SOC0 | ADC_FORCE_SOC1));
    
            //
            // Wait for ADCA to complete, then acknowledge flag
            //
            while(ADC_getInterruptStatus(myADC0_BASE, ADC_INT_NUMBER1) == false)
            {
            }
            ADC_clearInterruptStatus(myADC0_BASE, ADC_INT_NUMBER1);
    
            ADC_forceMultipleSOC(myADC1_BASE, (ADC_FORCE_SOC0 | ADC_FORCE_SOC1));
            //
            // Wait for ADCC to complete, then acknowledge flag
            //
            while(ADC_getInterruptStatus(myADC1_BASE, ADC_INT_NUMBER1) == false)
            {
            }
            ADC_clearInterruptStatus(myADC1_BASE, ADC_INT_NUMBER1);
    
            //
            // Store results
            //
    
            myADC0Result0 = ADC_readResult(ADCARESULT_BASE, ADC_SOC_NUMBER0);
            myADC0Result1 = ADC_readResult(ADCARESULT_BASE, ADC_SOC_NUMBER1);
            myADC1Result0 = ADC_readResult(ADCCRESULT_BASE, ADC_SOC_NUMBER0);
            myADC1Result1 = ADC_readResult(ADCCRESULT_BASE, ADC_SOC_NUMBER1);
    
            //
            // Software breakpoint. At this point, conversion results are stored in
            // myADC0Result0, myADC0Result1, myADC1Result0, and myADC1Result1.
            //
            // Hit run again to get updated conversions.
            //
            //ESTOP0;
        }
    }
    

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

    嗨、Nirdesh、

    感谢您的讲解。  A1 (SOC1)保持悬空、因此当 SOC1进行转换时、ADCA 采样电容器将有 SOC0的剩余电荷。  这就是您也会在 A1中看到转换值变化的原因。  将 A1连接到固定值(1.2V 电源或 GND)、并且在更改 A0上的电位器时、不应看到 SOC1值发生变化。

    此致、

    Joseph

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

    尊敬的 Joseph:

    您提供的解决方案是正确的,但,我使用 ADC 的目的是将每个2引脚数据转换为角度数据,以便我不能接地或连接到任何 Vreference。 我在两个引脚上都发出信号、但由于此串扰、我无法获得正确的输出波形。 我来说明一下、我们能否针对此串扰在 SysConfig 文件中进行任何配置更改。

    此致、

    Nirdhesh  

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

    您好、Nidesh:

    只要 SOC1不像您的实验中那样悬空、并且 SOC1连接到阻抗有限的源、并且您已经根据技术参考手册(SPRUIX1B)中的第11.13.2节(选择采集窗口持续时间)相应地设置了 ACQPS (采样时间)、那么您应该不会看到存储器串扰。  您的实验的问题是 A1一直悬空、因此采样电容器无法稳定到特定的电平。

    此致、

    Joseph

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

    Joseph、您好!

    感谢您的支持和信息、问题得到了解决。

    此致、

    Nirdhesh