大家好,
我使用DAC,它在stm8l151C6T6上运行正常,这是48pin MCU。
但现在我改为28pin DAC。它不起作用:
CLK_PeripheralClockConfig(CLK_Peripheral_DAC,ENABLE);
DAC_DeInit();
DAC_Init(DAC_Channel_1,DAC_Trigger_None,DAC_OutputBuffer_Enable);
SYSCFG_RIIOSwitchConfig(RI_IOSwitch_15,ENABLE);
DAC_WaveGenera
tionCmd(DAC_Channel_1,DAC_Wave_Noise,ENABLE);
DAC_Cmd(DAC_Channel_1,ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R,0x1500);
我在Pin PB4测量,但它总是很低。
请帮帮我。
最好的祝福
Thinh的
以上来自于谷歌翻译
以下为原文
Hi all,
I used DAC and it OK on stm8l151C6T6, this is 48pin MCU.
But now i change to 28pin DAC.It not work:
CLK_PeripheralClockConfig(CLK_Peripheral_DAC, ENABLE);
DAC_DeInit();
DAC_Init(DAC_Channel_1, DAC_Trigger_None, DAC_OutputBuffer_Enable);
SYSCFG_RIIOSwitchConfig(RI_IOSwitch_15, ENABLE);
DAC_WaveGenerationCmd(DAC_Channel_1, DAC_Wave_Noise, ENABLE);
DAC_Cmd(DAC_Channel_1, ENABLE);
DAC_SetChannel1Data(DAC_Align_12b_R, 0x1500);
I measure at Pin PB4, but it alway low.
Please help me.
Best regards
Thinh