资源简介

实现电子罗盘返回数据,STM32解码数据,在彩屏上显示

资源截图

代码片段和文件信息

#include “stm32f10x_lib.h“
#include“LCD_driver.h“
#include“chinese.h“
#include“char.h“


/********************************宏定义*********************************/
#define    LCD_rest(x) x ? GPIO_SetBits(GPIOA LCD_RST):   GPIO_ResetBits(GPIOA LCD_RST) //自己定义位操作函数
#define    LCD_rd(x)   x ? GPIO_SetBits(GPIOA LCD_RD) :   GPIO_ResetBits(GPIOA LCD_RD)
#define    LCD_rs(x)   x ? GPIO_SetBits(GPIOB LCD_RS) :   GPIO_ResetBits(GPIOB LCD_RS)
#define    LCD_wr(x)   x ? GPIO_SetBits(GPIOB LCD_WR) :   GPIO_ResetBits(GPIOB LCD_WR)
#define    LCD_cs(x)   x ? GPIO_SetBits(GPIOB LCD_CS) :   GPIO_ResetBits(GPIOB LCD_CS)


uint colors[]=
{
  0xf8000x07e00x001f0xffe00x00000x07ff0xf81f0xffff  //颜色数据
};


void LCD_Init(void)
{

    LCD_rest(1);
    delayms(5);
LCD_rest(0);
delayms(5);
LCD_rest(1);
delayms(5);

LCD_cs(0);  //打开片选使能
    LCD_Write_COM(0x000x10); LCD_Write_DATA(0x000x00); // Power Control 1  current consumption  STB                                                                                                                                                                                                                                                        
delayms(100);

LCD_Write_COM(0x000x11); LCD_Write_DATA(0x000x1c); // Power Control 2                                                                                                                                                                                                                                                             
LCD_Write_COM(0x000x12); LCD_Write_DATA(0x120x12); // Power Control 3  BT2-0 DC11-10 DC21-20 DC31-30 

                                                                                                                                                                                                                                            
LCD_Write_COM(0x000x13); LCD_Write_DATA(0x000x41); // Power Control 4  DCR_EX=0 DCR2-0 GVD6-0  
                                                                                                                                                                                                                                            
LCD_Write_COM(0x000x14); LCD_Write_DATA(0x400x50); // Power Control 5  VCOMG=0 VCM6-0 VCMR=0 VML6-0  
                                                                                                                                                                                                                                
LCD_Write_COM(0x000x10); LCD_Write_DATA(0x080x00); // Power Control 1 

                                                                                                                                                                                                                                                     
LCD_Write_COM(0x000x11); LCD_Write_DATA(0x010x1c); // Power C

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2013-04-23 17:15  电子罗盘---\
     文件      124696  2013-04-23 14:43  电子罗盘---\24stm-tff-char.axf
     文件       37520  2013-04-23 14:43  电子罗盘---\24stm-tff-char.hex
     文件       48207  2013-04-23 14:43  电子罗盘---\24stm-tff-char.htm
     文件         372  2013-04-23 14:43  电子罗盘---\24stm-tff-char.lnp
     文件       79206  2013-04-23 14:43  电子罗盘---\24stm-tff-char.map
     文件         170  2013-04-23 17:15  电子罗盘---\24stm-tff-char.plg
     文件        1142  2013-04-23 14:43  电子罗盘---\24stm-tff-char.tra
     文件        1101  2011-12-13 22:11  电子罗盘---\LCD_driver.h
     文件       19436  2011-12-19 10:57  电子罗盘---\Lcd.c
     文件       35265  2013-04-23 14:43  电子罗盘---\STM32F10x.lst
     文件        5156  2013-04-23 14:43  电子罗盘---\STM32F10x.o
     文件       11307  2008-09-23 09:17  电子罗盘---\STM32F10x.s
     文件     1759306  2009-01-29 16:20  电子罗盘---\STM32F10xR.LIB
     文件       44734  2011-04-27 11:57  电子罗盘---\char.h
     文件       11603  2011-04-27 12:20  电子罗盘---\chinese.h
     文件      124732  2013-04-22 18:34  电子罗盘---\dianziluopan.axf
     文件       37602  2013-04-22 18:34  电子罗盘---\dianziluopan.hex
     文件       48203  2013-04-22 18:34  电子罗盘---\dianziluopan.htm
     文件         368  2013-04-22 18:34  电子罗盘---\dianziluopan.lnp
     文件       79276  2013-04-22 18:34  电子罗盘---\dianziluopan.map
     文件         753  2013-04-22 21:50  电子罗盘---\dianziluopan.plg
     文件        1128  2013-04-22 18:34  电子罗盘---\dianziluopan.tra
     文件      153004  2013-04-23 14:43  电子罗盘---\lcd.crf
     文件        1629  2013-04-23 14:43  电子罗盘---\lcd.d
     文件      188280  2013-04-23 14:43  电子罗盘---\lcd.o
     文件       15672  2013-04-23 14:41  电子罗盘---\main.c
     文件      156738  2013-04-23 14:43  电子罗盘---\main.crf
     文件        1667  2013-04-23 14:43  电子罗盘---\main.d
     文件        1635  2008-09-23 09:24  电子罗盘---\main.h
     文件      181396  2013-04-23 14:43  电子罗盘---\main.o
............此处省略10个文件信息

评论

共有 条评论