AT32 ADC过采样例子

该博客介绍了使用ADC1和DMA将ADC1转换后的数据连续传输到内存的示例。ADC1配置为连续转换通道14,每次转换结束,DMA以循环模式将转换数据从ADC1 DR寄存器传输到变量。还给出了ADC时钟设置、过采样率等参数,可参考指定链接获取更多细节。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

ADC_over_sampling

/*************************************************/
This example describes how to use the ADC1 and DMA to transfer continuously converted data from ADC1 to memory.
The ADC1 is configured to convert continuously channel14.
Each time an end of conversion occurs the DMA transfers, in circular mode, the converted data from ADC1 DR register to the ADCConvertedValue variable.
The ADC1 clock is set to 18 MHz.

/ADC_OVSR:过采样率,取值:2,4,8,16,32,64,128,256/
#define ADC_OVSR 256

/ADC_shift:ADC结果右移,取值:0~8/
#define ADC_shift 4

/* Private typedef -----------------------------------------------------------/
/
Private define ------------------------------------------------------------/
/
Private macro -------------------------------------------------------------/
/
Private variables ---------------------------------------------------------/
ADC_InitType ADC_InitStru

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值