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.

有没有老哥有自己编出来的能实现ad转换的程序

Other Parts Discussed in Thread: MSP432WARE

小弟看了例程实在是不知道怎么编 顺便问一嘴例程的while函数里面的 PCM_gotoLPM0();函数是直接实现ad转换的输出了么 我只需要加入时钟电路还有控制ad转换,再加入采样频率就能实现多次采样了么

  • 你是开发联网的应用吗?如果不是,只是作为单片机使用,看看
    MSP432Ware这个
    去TI官网下载
  • /* Going to sleep */
    while (1)
    {
    PCM_gotoLPM0();
    }
    没看到上面注释吗,这个是进入睡眠的函数,不是直接输出ADC的。
    你看的这个例子是ADC中断 ,ADC转化后触发中断,在中断里读出来结果。
    /* This interrupt happens whenever a conversion has been completed and placed
    * into ADC_MEM0. */
    void ADC14_IRQHandler(void)
    {
    uint64_t status;

    status = ADC14_getEnabledInterruptStatus();
    ADC14_clearInterruptFlag(status);

    if(status & ADC_INT0)
    {
    adcResult = ADC14_getResult(ADC_MEM0);
    }

    }
  • 关于PCM_gotoLPM0();您可以看一下

    dev.ti.com/.../group__pcm__api.html

    Transitions the device into LPM0. 使设备进入LPM0状态

    Refer to the device specific data sheet for specifics about low power modes.

    Returns
    false if sleep state cannot be entered, true otherwise.

    例程的话,都是有详细的注释的,您现在是想实现哪种采样呢?