新手入门
- 积分
- 14
- 金钱
- 14
- 注册时间
- 2016-11-29
- 在线时间
- 0 小时
|
1金钱
void DAC_CONFIG(void)
{
DAC_SetInMode();//浮空输入
CLK_PeripheralClockConfig(CLK_Peripheral_DAC,ENABLE);
CLK_PeripheralClockConfig(CLK_Peripheral_COMP,ENABLE);
DAC_DeInit();
DAC_Init(DAC_Channel_1,DAC_Trigger_T4_TRGO,DAC_OutputBuffer_Enable);
DAC_Cmd(DAC_Channel_1,ENABLE);
SYSCFG_RIDeInit();
SYSCFG_RIIOSwitchConfig(RI_IOSwitch_14,ENABLE);
DAC_DMACmd(DAC_Channel_1, ENABLE);
//DAC_SoftwareTriggerCmd(DAC_Channel_1,ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R,4095);
//DMA1_Channel1
}
|
|