ADC_DUAL

所属分类:处理器开发
开发工具:C/C++
文件大小:1013KB
下载次数:231
上传日期:2010-09-24 13:17:41
上 传 者sddp001
说明:  STM32F10X ADC多路采集程序,STM32例程包之一
(STM32F10X ADC multiple acquisition program, STM32 routine one package)

文件列表:
ADC_DUAL\MDK_prj\Output\ADC_DUAL.plg (233, 2009-12-11)
ADC_DUAL\MDK_prj\Output\cortexm3_macro.o (2396, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_vector.o (5672, 2009-12-11)
ADC_DUAL\MDK_prj\Output\main.d (716, 2009-12-11)
ADC_DUAL\MDK_prj\Output\main.crf (253744, 2009-12-11)
ADC_DUAL\MDK_prj\Output\main.o (264620, 2009-12-11)
ADC_DUAL\MDK_prj\Output\lcd.d (661, 2009-12-11)
ADC_DUAL\MDK_prj\Output\lcd.crf (250712, 2009-12-11)
ADC_DUAL\MDK_prj\Output\lcd.o (259540, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_it.d (889, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_it.crf (254420, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_it.o (272700, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_lib.d (788, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_lib.crf (249402, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_lib.o (254628, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_adc.d (418, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_adc.crf (216761, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_adc.o (220420, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_dma.d (418, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_dma.crf (209304, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_dma.o (210236, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_rcc.d (357, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_rcc.crf (207625, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_rcc.o (208168, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_nvic.d (365, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_nvic.crf (203025, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_nvic.o (206824, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_flash.d (373, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_flash.crf (193029, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_flash.o (190080, 2009-12-11)
ADC_DUAL\MDK_prj\Output\ADC_DUAL.tra (1947, 2009-12-11)
ADC_DUAL\MDK_prj\Output\ADC_DUAL.sct (479, 2009-12-11)
ADC_DUAL\MDK_prj\Output\ADC_DUAL.lnp (593, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_gpio.d (427, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_gpio.crf (209101, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_gpio.o (210176, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_tim.d (418, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_tim.crf (242103, 2009-12-11)
ADC_DUAL\MDK_prj\Output\stm32f10x_tim.o (255572, 2009-12-11)
ADC_DUAL\MDK_prj\Output\ADC_DUAL.htm (81161, 2009-12-11)
... ...

/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** * File Name : readme.txt * Author : MCD Application Team * Version : V2.0.3 * Date : 09/22/2008 * Description : Description of the ADC regular simultaneous dual mode Example. ******************************************************************************** * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. * AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE * CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. *******************************************************************************/ Example description =================== This example describes how to use ADC1 and ADC2 in regular simultaneous dual mode. ADC1 is configured to convert channel14 and channel17 regular channels continuously. ADC2 is configured to convert channel11 and channel12 regular channels continuously. The connection between internal Vref and channel17 is enabled for ADC1. Once the regular channels conversion is started by software, channel14 is converted on ADC1 and channel11 is converted on ADC2 on the same time. The 32bits conversion result is then stored on ADC1 DR register. The DMA will transfer this data which will be stored ADC_DualConvertedValueTab table. Consecutively to those conversion, channel17 is converted on ADC1 and channel12 on ADC2. The combined conversion result is also transfered by DMA to the same destination buffer. The same procedure is repeated until the specified number of data to be transfered by DMA is reached. The ADC1 clock is set to 14 MHz. 本例展示了如何使用双ADC对多路通道进行同时转化。 使用ADC1对通道14和通道17进行转化。使用ADC2对通道10和通道11进行转化。 通道17与内部参考电压Vref相连。一旦转换开始,ADC1和ADC2对对通道17和10的转换将同时开始, 结果存于ADC1的32-bit DR寄存器内,其中高16bit为ADC2对通道10的转换结果, 低16bit为ADC1对通道17的转换结果。之后由DMA把DR寄存器内的数据传送到内存中的ADC_DualConvertedValueTab表格。 随后,ADC1和ADC2以及DMA会对通道14和通道11进行同样流程的转换和数据传送。 这样的转换-传送将会持续进行直到传送的数据数目达到DMA预设的上限。 Directory contents ================== stm32f10x_conf.h Library Configuration file stm32f10x_it.c Interrupt handlers stm32f10x_it.h Interrupt handlers header file main.c Main program lcd.h 液晶显示屏驱动头文件 lcd.c 液晶显示屏驱动文件 Hardware environment ==================== This example runs on STMicroelectronics STM3210B-EVAL and STM3210E-EVAL evaluation boards and can be easily tailored to any other hardware. - Connect a known voltage, between 0-3.3V, to ADC Channel14 mapped on pin PC.04 (potentiometer RV1 on STM3210B-EVAL and STM3210E-EVAL boards),ADC Channel11 mapped on pin PC.01 and ADC Channel12 mapped on pin PC.02. How to use it ============= In order to make the program work, you must do the following : - Create a project and setup all your toolchain's start-up files - Compile the directory content files and required Library files : + stm32f10x_lib.c + stm32f10x_adc.c + stm32f10x_dma.c + stm32f10x_gpio.c + stm32f10x_rcc.c + stm32f10x_nvic.c + stm32f10x_flash.c + stm32f10x_tim.c - Link all compiled files and load your image into target memory - Run the example ******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE******

近期下载者

相关文件


收藏者