关于adc

2019-03-23 19:24发布

问个东西,是否可以这样在,先adc1_channel1工作1分钟,然后切换到adc1_channel2工作1分钟,再切换到adc1_channel2工作1分钟,不停的循环往复,希望可以看到源代码,我那边有份错误的代码,至少没有得到应该的数据,方面的话可以交流一下,我qq 1097699242 此帖出自小平头技术问答
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
12条回答
dontium
2019-03-24 11:52
11.3.4 Single conversion mode
In Single conversion mode the ADC does one conversion. This mode is started either by
setting the ADON bit in the ADC_CR2 register (for a regular channel only) or by external
trigger (for a regular or injected channel), while the CONT bit is 0.
Once the conversion of the selected channel is complete:
● If a regular channel was converted:
– The converted data is stored in the 16-bit ADC_DR register
– The EOC (End Of Conversion) flag is set
– and an interrupt is generated if the EOCIE is set.
● If an injected channel was converted:
– The converted data is stored in the 16-bit ADC_DRJ1 register
– The JEOC (End Of Conversion Injected) flag is set
– and an interrupt is generated if the JEOCIE bit is set.
The ADC is then stopped.

一周热门 更多>