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.
在CCS上下载例程【buffdac_ex1_enable】,在示波器上观测DAC的输出
修改DAC的值,示波器上的波形没有变化,请问是哪里不对?
DAC初始化的代码如下:
void myDAC0_init()
{
//
// Set DAC reference voltage.
//
DAC_setReferenceVoltage(myDAC0_BASE, DAC_REF_VDAC);
//
// Set DAC load mode.
//
DAC_setLoadMode(myDAC0_BASE, DAC_LOAD_SYSCLK);
//
// Enable the DAC output
//
DAC_enableOutput(myDAC0_BASE);
//
// Set the DAC shadow output
//
DAC_setShadowValue(myDAC0_BASE, 0U);
//
// Delay for buffered DAC to power up.
//
DEVICE_DELAY_US(500);
}
硬件软件问题都有可能。
硬件方面,参考电压或电源异常,连接是否正确
软件方面代码中修改DAC值的部分是否正确。
不知道用的硬件是什么,建议用官方的开发板和例程,逐步进行调试,对比发现问题。