//有问题的程序。 /******************************************************************************* * 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; u8 adc_1[10]={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'; //驱动版本,默认为A 版本,一共4 个版本 unsigned char zifu[]={ /*-- 文字: --*/ /*-- 宋体9; 此字体下对应的点阵为:宽x 高 =6x12 --*/ /*-- 宽度不是8 的倍数,现调整为:宽度x 高度=8x12 --*/ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /*-- 文...