STM32 内部AD 采样程序--运行通过(测量电压范围0~33V)(运行通过的ARM.txt*一篇一篇的翻着以前的的签名,那时候的签名有多幼稚就有多么的幼稚。你连让我报复的资格都没有-〞好想某天来电显示是你的号码。好想某天你的状态是为我而写。 有些人,我们明知道是爱的,也要去放弃,因为没结局 /******************************************************************************* * File Name : main.c * Author : Wuhan R&D Center, Embest * Date First Issued : 08/08/2008 * Description : Main program body ********************************************************************************/ /* Includes ------------------------------------------------------------------*/ #include "stm32f10x_lib.h" #include"stdio.h" /* Private typedef -----------------------------------------------------------*/ /* Private define ------------------------------------------------------------*/ //#define ADC1_DR_Address ((u32)0x4001244C) float AD_value=0.0; u8 adc_1[6]={0};//用来存放经ADC 转换后的电压值的每一位数值。 /* Private macro -------------------------------------------------------------*/ /* Private variables ---------------------------------------------------------*/ ADC_InitTypeDef ADC_InitStructure; //DMA_InitTypeDef DMA_InitStructure; //vu16 ADC_ConvertedValue; ErrorStatus HSEStartUpStatus; /* Private function prototypes -----------------------------------------------*/ void RCC_Configuration(void); void GPIO_Configuration(void); void SysTick_Configuration(void); #define LED1ON GPIO_SetBits(GPIOF,GPIO_Pin_0) #define LED1OFF GPIO_ResetBits(GPIOF,GPIO_Pin_0) //片选cs #define LED2ON GPIO_SetBits(GPIOF,GPIO_Pin_1) #define LED2OFF GPIO_ResetBits(GPIOF,GPIO_Pin_1)//复位rest #define LED3ON GPIO_SetBits(GPIOF,GPIO_Pin_2) #define LED3OFF GPIO_ResetBits(GPIOF,GPIO_Pin_2)//数据sdata #define LED4ON GPIO_SetBits(GPIOF,GPIO_Pin_3) #define LED4OFF GPIO_ResetBits(GPIOF,GPIO_Pin_3)//时钟sclk unsigned char Ver='A'; //驱动版本,默...