1设计要求
利用ADC的第11通道对开发板输入的电压值作AD转换,采用连续转换模式,转换结果通过DMA通
道1读取。ADC转换的结果,每间隔1秒钟向串口发送一次。
2 硬件电路设计
在开发板上通用I/O口PA.01与XS3-7相连,将PA1映射到ADC第1通道,即可实现利用ADC_IN1
对输入电压作AD转换。
3软件程序设计
根据设计任务要求,软件程序主要包括:
(1) 配置GPIO口,将PA.01配置为ADC的第1采样通道;将配置GPIO中PA.09和PA.10根引脚为串口输入输出。
(2) 设置ADC,将ADC_IN1设置为连续转换模式;
(3) 配置DMA通道1用于ADC_IN1传输转换的结果;
(4) 配置串口及相关发送功能;
(5) 每隔1S向串口输出AD转换结果。
4 运行过程
(1) 使用Keil uVision3 通过JLINK仿真器连接开发板,使用串口线,连接实验板
上的UART1和PC机的串口,打开实验例程目录下的STM32-FD-ADC.Uv2例程,编译链接工程;
(2) 在PC机上运行windows自带的超级终端串口通信程序(波特率115200、1位停止位、无校验位、无硬件流
控制);或者使用其它串口通信程序;
(3) 点击MDK 的Debug菜单,点击Start/Stop Debug Session;
usart1 print AD_value --------------------------
The current AD value = 0x0425
The current AD value = 0x0423
The current AD value = 0x0421
The current AD value = 0x0422
The current AD value = 0x0420
The current AD value = 0x0416
The current AD value = 0x03B6
The current AD value = 0x0841
The current AD value = 0x08C3
The current AD value = 0x08C0
The current AD value = 0x08BE
The current AD value = 0x09E9
The current AD value = 0x0A12
The current AD value = 0x0ACA
The current AD value = 0x0B0D
The current AD value = 0x0B10
The current AD value = 0x0B0E
....
....
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
STM32-ADC.rar_32ADC. com_STM32F4 ADC_stm32 adc_stm32f4 (128个子文件)
STM32-FD-ADC_Opt.Bak 3KB
STM32-FD-ADC_Uv2.Bak 3KB
stm32f10x_tim.c 105KB
stm32f10x_flash.c 62KB
stm32f10x_rcc.c 50KB
stm32f10x_adc.c 46KB
stm32f10x_i2c.c 43KB
stm32f10x_usart.c 37KB
stm32f10x_fsmc.c 34KB
system_stm32f10x.c 31KB
stm32f10x_can.c 31KB
stm32f10x_spi.c 29KB
stm32f10x_sdio.c 28KB
stm32f10x_dma.c 27KB
system_stm32f10x.c 24KB
stm32f10x_it.c 22KB
stm32f10x_gpio.c 19KB
stm32f10x_dac.c 19KB
core_cm3.c 17KB
main.c 13KB
stm32f10x_cec.c 11KB
hw_config.c 10KB
stm32f10x_pwr.c 9KB
stm32f10x_rtc.c 8KB
stm32f10x_bkp.c 8KB
misc.c 7KB
stm32f10x_exti.c 7KB
stm32f10x_wwdg.c 6KB
stm32f10x_dbgmcu.c 5KB
stm32f10x_iwdg.c 5KB
stm32f10x_crc.c 3KB
main.crf 268KB
stm32f10x_adc.crf 248KB
stm32f10x_flash.crf 245KB
stm32f10x_usart.crf 244KB
stm32f10x_dma.crf 240KB
stm32f10x_rcc.crf 239KB
stm32f10x_gpio.crf 235KB
misc.crf 233KB
main.d 619B
stm32f10x_flash.d 524B
stm32f10x_usart.d 524B
stm32f10x_gpio.d 512B
stm32f10x_dma.d 500B
stm32f10x_rcc.d 500B
stm32f10x_adc.d 500B
misc.d 392B
stm32f10x_it.d 86B
startup_stm32f10x_md.d 62B
STM32-FD-ADC_STM32-FD-ADC.dep 7KB
stm32f10x.h 607KB
core_cm3.h 84KB
stm32f10x_tim.h 49KB
stm32f10x_rcc.h 30KB
stm32f10x_i2c.h 29KB
stm32f10x_fsmc.h 26KB
stm32f10x_flash.h 25KB
stm32f10x_sdio.h 21KB
stm32f10x_adc.h 21KB
stm32f10x_dma.h 20KB
stm32f10x_can.h 20KB
stm32f10x_gpio.h 19KB
stm32f10x_spi.h 18KB
stm32f10x_usart.h 16KB
stm32f10x_dac.h 15KB
misc.h 9KB
stm32f10x_bkp.h 7KB
stm32f10x_exti.h 7KB
stm32f10x_cec.h 6KB
stm32f10x_pwr.h 4KB
stm32f10x_rtc.h 4KB
stm32f10x_iwdg.h 4KB
stm32f10x_dbgmcu.h 4KB
stm32f10x_it.h 3KB
stm32f10x_conf.h 3KB
stm32f10x_wwdg.h 3KB
stm32f10x_crc.h 2KB
system_stm32f10x.h 2KB
main.i 87KB
stm32f10x_flash.i 78KB
stm32f10x_adc.i 75KB
stm32f10x_usart.i 72KB
stm32f10x_rcc.i 71KB
stm32f10x_dma.i 66KB
stm32f10x_gpio.i 66KB
misc.i 60KB
stm32f10x_it.i 169B
main.lst 1.56MB
stm32f10x_flash.lst 1.48MB
stm32f10x_rcc.lst 1.48MB
stm32f10x_adc.lst 1.46MB
stm32f10x_usart.lst 1.44MB
stm32f10x_dma.lst 1.44MB
stm32f10x_gpio.lst 1.43MB
misc.lst 1.4MB
startup_stm32f10x_hd.lst 50KB
startup_stm32f10x_md.lst 39KB
STM32F10x.lst 31KB
stm32f10x_vector.lst 30KB
cortexm3_macro.lst 24KB
共 128 条
- 1
- 2
资源评论
林当时
- 粉丝: 100
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功