1、#include stm32f10x_lib.h#includestdio.h/* Private typedef -*/* Private define -*/#define ADC1_DR_Address (u32)0x4001244C)float AD_value=0.0;u8 adc_16=0;/用来存放经ADC转换后的电压值的每一位数值。/* Private macro -*/* Private variables -*/ADC_InitTypeDef ADC_InitStructure;/DMA_InitTypeDef DMA_InitStructure;/vu16 ADC_Con
2、vertedValue;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(GPI
3、OF,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)/时钟sclkunsigned char Ver=A; /驱动版
4、本,默认为A版本,一共4个版本unsigned char zifu= /*- 文字: -*/*- 宋体9; 此字体下对应的点阵为:宽x高=6x12 -*/*- 宽度不是8的倍数,现调整为:宽度x高度=8x12 -*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, !0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00, 0x00,0x28,0x50,0x50,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, # -*/0x0
5、0,0x00,0x28,0x28,0xFC,0x28,0x50,0xFC,0x50,0x50,0x00,0x00, $ -*/0x00,0x20,0x78,0xA8,0xA0,0x60,0x30,0x28,0xA8,0xF0,0x20,0x00, % -*/0x00,0x00,0x48,0xA8,0xB0,0x50,0x28,0x34,0x54,0x48,0x00,0x00, &0x00,0x00,0x20,0x50,0x50,0x78,0xA8,0xA8,0x90,0x6C,0x00,0x00, 0x00,0x40,0x40,0x80,0x00,0x00,0x00,0x00,0x00,0x0
6、0,0x00,0x00, ( -*/0x00,0x04,0x08,0x10,0x10,0x10,0x10,0x10,0x10,0x08,0x04,0x00, ) -*/0x00,0x40,0x20,0x10,0x10,0x10,0x10,0x10,0x10,0x20,0x40,0x00, * -*/0x00,0x00,0x00,0x20,0xA8,0x70,0x70,0xA8,0x20,0x00,0x00,0x00, + -*/0x00,0x00,0x20,0x20,0x20,0xF8,0x20,0x20,0x20,0x00,0x00,0x00, , -*/0x00,0x00,0x00,0x0
7、0,0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x80, - -*/0x00,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00, . -*/0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00, / -*/0x00,0x08,0x10,0x10,0x10,0x20,0x20,0x40,0x40,0x40,0x80,0x00, 0 -*/0x00,0x00,0x70,0x88,0x88,0x88,0x88,0x88,0x88,0x70,0x00
8、,0x00, 1 -*/0x00,0x00,0x20,0x60,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00, 2 -*/0x00,0x00,0x70,0x88,0x88,0x10,0x20,0x40,0x80,0xF8,0x00,0x00, 3 -*/0x00,0x00,0x70,0x88,0x08,0x30,0x08,0x08,0x88,0x70,0x00,0x00, 4 -*/0x00,0x00,0x10,0x30,0x50,0x50,0x90,0x78,0x10,0x18,0x00,0x00, 5 -*/0x00,0x00,0xF8,0x80,0x80
9、,0xF0,0x08,0x08,0x88,0x70,0x00,0x00, 6 -*/0x00,0x00,0x70,0x90,0x80,0xF0,0x88,0x88,0x88,0x70,0x00,0x00, 7 -*/0x00,0x00,0xF8,0x90,0x10,0x20,0x20,0x20,0x20,0x20,0x00,0x00, 8 -*/0x00,0x00,0x70,0x88,0x88,0x70,0x88,0x88,0x88,0x70,0x00,0x00, 9 -*/0x00,0x00,0x70,0x88,0x88,0x88,0x78,0x08,0x48,0x70,0x00,0x00,
10、 :0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x20,0x00,0x00, ;0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x20,0x20,0x00, 0x00,0x40,0x20,0x10,0x08,0x04,0x08,0x10,0x20,0x40,0x00,0x00, ?0x00,0x00,0x70,0x88,0x88,0x10,0x20,0x20,0x00,0x20,0x00,0x00, -*/0x00,0x00,0x70,0x88,0x98,0xA8,0xA8,0xB8,0x80,0x78
11、,0x00,0x00, A -*/0x00,0x00,0x20,0x20,0x30,0x50,0x50,0x78,0x48,0xCC,0x00,0x00, B -*/0x00,0x00,0xF0,0x48,0x48,0x70,0x48,0x48,0x48,0xF0,0x00,0x00, C -*/宽x高=6x12 -*/0x00,0x00,0x78,0x88,0x80,0x80,0x80,0x80,0x88,0x70,0x00,0x00, D -*/0x00,0x00,0xF0,0x48,0x48,0x48,0x48,0x48,0x48,0xF0,0x00,0x00, E -*/0x00,0x
12、00,0xF8,0x48,0x50,0x70,0x50,0x40,0x48,0xF8,0x00,0x00, F -*/0x00,0x00,0xF8,0x48,0x50,0x70,0x50,0x40,0x40,0xE0,0x00,0x00, G -*/0x00,0x00,0x38,0x48,0x80,0x80,0x9C,0x88,0x48,0x30,0x00,0x00, H -*/0x00,0x00,0xCC,0x48,0x48,0x78,0x48,0x48,0x48,0xCC,0x00,0x00, I -*/0x00,0x00,0xF8,0x20,0x20,0x20,0x20,0x20,0x2
13、0,0xF8,0x00,0x00, J -*/0x00,0x00,0x7C,0x10,0x10,0x10,0x10,0x10,0x10,0x90,0xE0,0x00, K -*/0x00,0x00,0xEC,0x48,0x50,0x60,0x50,0x50,0x48,0xEC,0x00,0x00, L -*/0x00,0x00,0xE0,0x40,0x40,0x40,0x40,0x40,0x44,0xFC,0x00,0x00, M -*/0x00,0x00,0xD8,0xD8,0xD8,0xD8,0xA8,0xA8,0xA8,0xA8,0x00,0x00, N -*/0x00,0x00,0xD
14、C,0x48,0x68,0x68,0x58,0x58,0x48,0xE8,0x00,0x00, O -*/ P -*/0x00,0x00,0xF0,0x48,0x48,0x70,0x40,0x40,0x40,0xE0,0x00,0x00, Q -*/0x00,0x00,0x70,0x88,0x88,0x88,0x88,0xE8,0x98,0x70,0x18,0x00, R -*/0x00,0x00,0xF0,0x48,0x48,0x70,0x50,0x48,0x48,0xEC,0x00,0x00, S -*/0x00,0x00,0x78,0x88,0x80,0x60,0x10,0x08,0x88,0xF0,0x00,0x00, T -*/0x00,0x00,0xF8,0xA8,0x20,0x20,0x20,0x20,0x20,0x70,0x00,0x00, U -*/0x00,0x00,0xCC,0x48,0x48,0x48,0x48,0x48,0x48,0
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1