STM32f100的DA输出一直为0,不知道为什么?
代码: RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE);
DAC_InitStructure.DAC_Trigger = DAC_Trigger_Software;
DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None; //²»´ÓDAC¶Ë¿Ú²úÉú²¨ÐÎ
DAC_InitStructure.DAC_LFSRUnmask_TriangleAmplitude = DAC_LFSRUnmask_Bit0;
DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Enable; DAC_Init(DAC_Channel_2, &DAC_InitStructure);
DAC_Cmd(DAC_Channel_2, ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R, 4095);
DAC_SoftwareTriggerCmd(DAC_Channel_1, ENABLE);
在电路设计上有需要注意的地方么?
|