void DAC1_Init(void)
{
ADC1_GPIO_Config();
ADC1_Mode_Config();
for(;;)
{
DAC_SetChannel2Data(DAC_Align_12b_R,0xFFFF);
DAC_SetChannel1Data(DAC_Align_12b_R,0xFFFF);
Delay_us(5);
DAC_SetChannel1Data(DAC_Align_12b_R,0xdddd);
Delay_us(5);
DAC_SetChannel1Data(DAC_Align_12b_R,0xaaaa);
Delay_us(5);
DAC_SetChannel1Data(DAC_Align_12b_R,0x9999);
Delay_us(5);
}
之后程序该怎么写。DAC已全部配置好。 |