2013-10-18 12:50 AM
HI
I have a small issue with the DAC in a stm32F103, there Is a small offset between DAC_DHR12R1 and DAC_DOR1 registersThe code is pretty simple:DAC_InitStructure.DAC_Trigger = DAC_Trigger_Software;DAC_InitStructure.DAC_WaveGeneration = DAC_WaveGeneration_None;DAC_InitStructure.DAC_OutputBuffer = DAC_OutputBuffer_Enable;DAC_Init( DAC_Channel_1, &DAC_InitStructure );DAC_SetChannel1Data( DAC_Align_12b_R, value );DAC_SoftwareTriggerCmd(DAC_Channel_1, ENABLE);And the test result:DAC_DHR12R1 DAC_DOR140 41409 4111023 10262047 20513071 30764095 5Has anyone else seen the same problem?Another thing is that I can�t get it to work with DAC_Trigger_None. any ideas? #dac2013-10-22 02:40 AM
Hi Panduro,
Isn't the commande enabling the DAC Channel1 missed?DAC_Cmd(DAC_Channel_1, ENABLE);
-Mayla-
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2013-10-23 12:42 AM
Yes, (copy paste error) I have it in my code.