本篇博文最后修改时间:2017年06月02日,06:22。

一、简介

本篇以SimpleBLECentral工程为例,介绍如何在OLED(SSD1306)上显示自定义数据

二、实验平台

协议栈版本:ble_cc26xx_2_01_00_44423

编译软件:IAR Embedded Workbench for ARM Version 7.40

硬件平台:CC26xxDK开发板

仿真器:XDS100V3(香瓜)


版权声明

博主:甜甜的大香瓜

声明:喝水不忘挖井人,转载请注明出处。

原文地址:http://blog.csdn.NET/feilusia

联系方式:897503845@qq.com

香瓜BLE之CC2541群:127442605

香瓜BLE之CC2640群:557278427

香瓜BLE之Android群:541462902

香瓜单片机之STM8/STM32群:164311667
香瓜单片机之Linux群:512598061

香瓜单片机之职场交流群:450154342
甜甜的大香瓜的小店(淘宝店):https://shop217632629.taobao.com/?spm=2013.1.1000126.d21.hd2o8i

四、代码修改

1、IAR设置中的添加宏

TI_DRIVERS_LCD_INCLUDED

其实默认已添加。

2、更换LCD驱动(替换IAR工程中的board_lcd.c)
/*******************************************************************************Filename:       board_lcd.cRevised:        $Date: 2014-03-10 07:29:12 -0700 (Mon, 10 Mar 2014) $Revision:       $Revision: 37597 $Description:    This file contains the interface to the SRF06EB LCD Service.Copyright 2014 Texas Instruments Incorporated. All rights reserved.IMPORTANT: Your use of this Software is limited to those specific rightsgranted under the terms of a software license agreement between the userwho downloaded the software, his/her employer (which must be your employer)and Texas Instruments Incorporated (the "License").  You may not use thisSoftware unless you agree to abide by the terms of the License. The Licenselimits your use, and you acknowledge, that the Software may not be modified,copied or distributed unless embedded on a Texas Instruments microcontrolleror used solely and exclusively in conjunction with a Texas Instruments radiofrequency transceiver, which is integrated into your product.  Other than forthe foregoing purpose, you may not use, reproduce, copy, prepare derivativeworks of, modify, distribute, perform, display or sell this Software and/orits documentation for any purpose.YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION AREPROVIDED 揂S IS?WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALLTEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHERLEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSESINCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVEOR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENTOF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.Should you have any questions regarding your right to use this Software,contact Texas Instruments Incorporated at www.TI.com.
*******************************************************************************//********************************************************************** INCLUDES*/
#include <ti/sysbios/knl/Task.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/sysbios/knl/Queue.h>
#include <ti/drivers/lcd/LCDDogm1286.h>#include "board_lcd.h"
#include "Board.h"/********************************************************************** TYPEDEFS*//********************************************************************** LOCAL FUNCTIONS*//******************************************************************************** EXTERNAL VARIABLES*//********************************************************************** LOCAL VARIABLES*//********************************************************************** PUBLIC FUNCTIONS*//*
【注意】我们的开发板的底板目前总共有两个版本,为V1.2版本与V2.0版本,版本号显示于底板上部正中间位置, 这两个底板的版本主要是OLED显示屏的复位线的不同,V1.2版本使用DIO_5作为OLED显示屏的复位控制端口(此端口与IIC接口共用 了,是我们的设计失误),V2.0版本使用DIO_26作为OLED显示屏的复位控制端口。因此,请根据你底板上标注的版本号进行对应操作。
*/
#define HW_VER1_2       12  // 硬件版本V1.2
#define HW_VER2_0       20  // 硬件版本V2.0
#define HW_VER          HW_VER2_0#define  uint8  unsigned char
#define  uint16  unsigned short
#define  uint32  unsigned int#define TI_DRIVERS_LCD_AMOMCU#ifdef TI_DRIVERS_LCD_AMOMCU
#include "stdio.h"
#include "string.h"#include "util.h"
#include "Board.h"#ifdef NPI_USE_UART
#include "Board_uart.h"
#endif#define LCD_SCL GPIO_PIN_9       //SCLK  时钟 D0(SCLK)
#define LCD_SDA GPIO_PIN_10     //SDA   D1(MOSI) 数据
#define LCD_RST GPIO_PIN_4       //_RES  hardware reset   复位 #if(HW_VER == HW_VER1_2 )
#define LCD_DC  GPIO_PIN_5       //A0  H/L 命令数据选通端,H:数据,L:命令
#elif (HW_VER == HW_VER2_0)
#define LCD_DC  GPIO_PIN_26      //A0  H/L 命令数据选通端,H:数据,L:命令
#endif#define X_WIDTH        128
#define Y_WIDTH        64/* LCD lines */
#define LCD_MAX_LINE_COUNT              8
#define LCD_MAX_LINE_LENGTH             21
#define LCD_MAX_BUF                     25#define HAL_LCD_MAX_CHARS   16
#define HAL_LCD_MAX_BUFF    25#define LCD_SUPPORT
#define HAL_LCD   TRUEstatic uint8 Lcd_Line1[HAL_LCD_MAX_CHARS+1];#ifdef LCD_SUPPORT
/***************************16*16的点阵字体取模方式:共阴——列行式——逆向输出*********/
const unsigned char F16x16[] =
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*--  文字:  服  --*/
0x00,0xFF,0xFF,0x33,0xFF,0xFF,0x00,0xFF,0xFF,0xC3,0xDB,0xDB,0xDF,0xCF,0x00,0x00,
0x20,0x7F,0x1F,0x63,0x7F,0x3F,0x00,0x7F,0x7F,0x20,0x37,0x18,0x3F,0x73,0x20,0x00,/*--  文字:  务  --*/
0x80,0x80,0x90,0x98,0xCC,0xDF,0x77,0x66,0x66,0xF6,0xDE,0x8E,0x80,0x80,0x80,0x00,
0x00,0x61,0x61,0x67,0x36,0x3E,0x1F,0x07,0x06,0x66,0x7E,0x3F,0x01,0x01,0x00,0x00,/*--  文字:  创  --*/
0x20,0x30,0xF8,0xEC,0x67,0x6F,0xFC,0xF8,0x10,0xF8,0xF8,0x00,0xFE,0xFE,0x00,0x00,
0x00,0x00,0x3F,0x7F,0x60,0x66,0x67,0x73,0x30,0x0F,0x0F,0x60,0x7F,0x3F,0x00,0x00,/*--  文字:  新  --*/
0x00,0x66,0x7E,0x7E,0xE7,0xFF,0x7E,0x66,0x00,0xFE,0xFE,0x66,0xE6,0xE7,0x63,0x00,
0x00,0x33,0x1B,0x63,0x7F,0x3F,0x0B,0x5B,0x70,0x3F,0x0F,0x00,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*--  文字:  深  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x61,0x06,0xE0,0x00,0x26,0x22,0x1A,0x02,0xC2,0x0A,0x12,0x32,0x06,0x02,0x00,
0x04,0xFC,0x03,0x20,0x20,0x11,0x11,0x09,0x05,0xFF,0x05,0x09,0x19,0x31,0x10,0x00,/*--  文字:  圳  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x10,0x10,0xFE,0x10,0x10,0xFE,0x00,0x00,0xFC,0x00,0x00,0x00,0xFE,0x00,0x00,
0x08,0x08,0x04,0x47,0x24,0x18,0x07,0x00,0x00,0x1F,0x00,0x00,0x00,0x7F,0x00,0x00,/*--  文字:  市  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x04,0x04,0x04,0xE4,0x24,0x24,0x25,0xFE,0x24,0x24,0x24,0x24,0xE4,0x04,0x04,0x00,
0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0xFF,0x00,0x00,0x10,0x20,0x1F,0x00,0x00,0x00,/*--  文字:  电  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0xF8,0x48,0x48,0x48,0x48,0xFF,0x48,0x48,0x48,0x48,0xF8,0x00,0x00,0x00,
0x00,0x00,0x0F,0x04,0x04,0x04,0x04,0x3F,0x44,0x44,0x44,0x44,0x4F,0x40,0x70,0x00,/*--  文字:  装  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x42,0x2C,0x24,0x10,0xFF,0x04,0x64,0xA4,0x24,0x3F,0x24,0x24,0x24,0x04,0x00,
0x20,0x21,0x11,0x11,0xF9,0x45,0x23,0x03,0x05,0x09,0x11,0x29,0x45,0xC1,0x41,0x00,/*--  文字:  科  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x12,0x92,0x72,0xFE,0x51,0x91,0x00,0x22,0xCC,0x00,0x00,0xFF,0x00,0x00,0x00,
0x04,0x02,0x01,0x00,0xFF,0x00,0x04,0x04,0x04,0x02,0x02,0x02,0xFF,0x01,0x01,0x00,/*--  文字:  技  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x08,0x08,0x88,0xFF,0x48,0x28,0x00,0xC8,0x48,0x48,0x7F,0x48,0xC8,0x48,0x08,0x00,
0x01,0x41,0x80,0x7F,0x00,0x40,0x40,0x20,0x13,0x0C,0x0C,0x12,0x21,0x60,0x20,0x00,/*--  文字:  专  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x20,0x20,0x24,0x24,0xA4,0x64,0x3C,0x27,0x24,0x24,0xA4,0x24,0x24,0x20,0x20,0x00,
0x00,0x00,0x00,0x00,0x01,0x01,0x09,0x11,0x29,0x45,0x03,0x01,0x00,0x00,0x00,0x00,/*--  文字:  业  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x10,0x60,0x80,0x00,0xFF,0x00,0x00,0x00,0xFF,0x00,0x80,0x60,0x38,0x10,0x00,
0x20,0x20,0x20,0x23,0x21,0x3F,0x20,0x20,0x20,0x3F,0x22,0x21,0x20,0x30,0x20,0x00,/*--  文字:  专  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x20,0x20,0x24,0x24,0xA4,0x64,0x3C,0x27,0x24,0x24,0xA4,0x24,0x24,0x20,0x20,0x00,
0x00,0x00,0x00,0x00,0x01,0x01,0x09,0x11,0x29,0x45,0x03,0x01,0x00,0x00,0x00,0x00,/*--  文字:  注  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x60,0x01,0x86,0x60,0x08,0x08,0x08,0x09,0xFE,0x08,0x08,0x08,0x08,0x08,0x00,
0x04,0x04,0xFE,0x01,0x40,0x40,0x41,0x41,0x41,0x7F,0x41,0x41,0x41,0x41,0x40,0x00,/*--  文字:  无  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x40,0x42,0x42,0x42,0x42,0x42,0xFE,0xC2,0x42,0x42,0x42,0x42,0x42,0x40,0x00,
0x40,0x40,0x20,0x10,0x08,0x04,0x03,0x00,0x3F,0x40,0x40,0x40,0x40,0x40,0x70,0x00,/*--  文字:  线  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x60,0x58,0xC7,0x62,0x00,0x90,0x90,0x90,0xFF,0x90,0x92,0x9C,0x94,0x80,0x00,
0x20,0x22,0x23,0x12,0x12,0x12,0x20,0x20,0x10,0x13,0x0C,0x14,0x22,0x40,0xF8,0x00,/*--  文字:  通  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x41,0xC6,0x00,0x00,0xF2,0x52,0x52,0x56,0xFA,0x5A,0x56,0xF2,0x00,0x00,0x00,
0x40,0x20,0x1F,0x20,0x40,0x5F,0x42,0x42,0x42,0x5F,0x4A,0x52,0x4F,0x40,0x40,0x00,/*--  文字:  讯  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x20,0x21,0x2E,0xE4,0x00,0x42,0x42,0xFE,0x42,0x42,0x42,0x02,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x7F,0x20,0x10,0x00,0x7F,0x00,0x00,0x00,0x00,0x3F,0x40,0x38,0x00,/*--  文字:  十  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0xFF,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*--  文字:  年  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x20,0x10,0x0C,0xE3,0x22,0x22,0x22,0xFE,0x22,0x22,0x22,0x22,0x02,0x00,0x00,
0x04,0x04,0x04,0x04,0x07,0x04,0x04,0x04,0xFF,0x04,0x04,0x04,0x04,0x04,0x04,0x00,/*--  文字:  经  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x20,0x30,0xAC,0x63,0x10,0x00,0x40,0x42,0x22,0x22,0x12,0x1A,0x26,0x42,0xC0,0x00,
0x22,0x23,0x22,0x12,0x12,0x00,0x20,0x21,0x21,0x21,0x3F,0x21,0x21,0x21,0x20,0x00,/*--  文字:  验  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x02,0xFA,0x82,0x82,0xFE,0x80,0x40,0x60,0x58,0x46,0x48,0x50,0x20,0x20,0x20,0x00,
0x08,0x08,0x04,0x24,0x40,0x3F,0x22,0x2C,0x21,0x2E,0x20,0x30,0x2C,0x23,0x20,0x00,/*--  文字:  开  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x42,0x42,0x42,0x42,0xFE,0x42,0x42,0x42,0x42,0xFE,0x42,0x42,0x42,0x42,0x00,
0x00,0x40,0x20,0x10,0x0C,0x03,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,/*--  文字:  拓  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x08,0x08,0x08,0xFF,0x48,0x28,0x0A,0x02,0xE2,0x9E,0x82,0x82,0x82,0x82,0x02,0x00,
0x02,0x42,0x81,0x7F,0x00,0x08,0x04,0x03,0x7F,0x20,0x20,0x20,0x20,0x7F,0x00,0x00,/*--  文字:  创  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x20,0xD0,0x4C,0x43,0x44,0x48,0xD8,0x30,0x10,0x00,0xFC,0x00,0x00,0xFF,0x00,
0x00,0x00,0x3F,0x40,0x40,0x42,0x44,0x43,0x78,0x00,0x00,0x07,0x20,0x40,0x3F,0x00,/*--  文字:  新  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x20,0x24,0x2C,0x35,0xE6,0x34,0x2C,0x24,0x00,0xFC,0x24,0x24,0xE2,0x22,0x22,0x00,
0x21,0x11,0x4D,0x81,0x7F,0x05,0x59,0x21,0x18,0x07,0x00,0x00,0xFF,0x00,0x00,0x00,/*--  文字:  !  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/****************************************8*16的点阵************************************/
static const unsigned char F8X16[]=
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 00x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 10x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 20x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 30x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 40xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 50x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 60x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 70x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 80x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 90x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 100x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 110x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 120x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 130x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 140x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 150x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 160x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 170x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 180x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 190x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 200x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 210x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 220x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 230x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 240x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 250x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 260x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 270x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 280x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 290x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 300x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 310xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 320x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 330x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 340xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 350x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 360x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 370x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 380xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 390x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 400x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 410x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 420x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 430x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 440x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 450x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 460xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 470x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 480xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 490x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 500x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 510x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 520x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 530x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 540xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 550x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 560x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 570x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 580x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 590x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 600x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 610x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 620x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 630x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 640x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 650x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 660x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 670x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 680x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 690x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 700x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 710x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 720x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 730x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 740x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 750x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 760x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 770x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 780x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 790x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 800x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 810x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 820x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 830x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 840x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 850x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 860x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 870x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 880x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 890x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 900x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 910x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 920x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 930x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94
};
#endif/************************************6*8的点阵************************************/
static const unsigned char F6x8[92][6] =
{
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,// sp
0x00, 0x00, 0x00, 0x2f, 0x00, 0x00,// !
0x00, 0x00, 0x07, 0x00, 0x07, 0x00,// "
0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14,// #
0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12,// $
0x00, 0x62, 0x64, 0x08, 0x13, 0x23,// %
0x00, 0x36, 0x49, 0x55, 0x22, 0x50,// &
0x00, 0x00, 0x05, 0x03, 0x00, 0x00,// '
0x00, 0x00, 0x1c, 0x22, 0x41, 0x00,// (
0x00, 0x00, 0x41, 0x22, 0x1c, 0x00,// )
0x00, 0x14, 0x08, 0x3E, 0x08, 0x14,// *
0x00, 0x08, 0x08, 0x3E, 0x08, 0x08,// +
0x00, 0x00, 0x00, 0xA0, 0x60, 0x00,// ,
0x00, 0x08, 0x08, 0x08, 0x08, 0x08,// -
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,// .
0x00, 0x20, 0x10, 0x08, 0x04, 0x02,// /
0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E,// 0
0x00, 0x00, 0x42, 0x7F, 0x40, 0x00,// 1
0x00, 0x42, 0x61, 0x51, 0x49, 0x46,// 2
0x00, 0x21, 0x41, 0x45, 0x4B, 0x31,// 3
0x00, 0x18, 0x14, 0x12, 0x7F, 0x10,// 4
0x00, 0x27, 0x45, 0x45, 0x45, 0x39,// 5
0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30,// 6
0x00, 0x01, 0x71, 0x09, 0x05, 0x03,// 7
0x00, 0x36, 0x49, 0x49, 0x49, 0x36,// 8
0x00, 0x06, 0x49, 0x49, 0x29, 0x1E,// 9
0x00, 0x00, 0x36, 0x36, 0x00, 0x00,// :
0x00, 0x00, 0x56, 0x36, 0x00, 0x00,// ;
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,// <
0x00, 0x14, 0x14, 0x14, 0x14, 0x14,// =
0x00, 0x00, 0x41, 0x22, 0x14, 0x08,// >
0x00, 0x02, 0x01, 0x51, 0x09, 0x06,// ?
0x00, 0x32, 0x49, 0x59, 0x51, 0x3E,// @
0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C,// A
0x00, 0x7F, 0x49, 0x49, 0x49, 0x36,// B
0x00, 0x3E, 0x41, 0x41, 0x41, 0x22,// C
0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C,// D
0x00, 0x7F, 0x49, 0x49, 0x49, 0x41,// E
0x00, 0x7F, 0x09, 0x09, 0x09, 0x01,// F
0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A,// G
0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F,// H
0x00, 0x00, 0x41, 0x7F, 0x41, 0x00,// I
0x00, 0x20, 0x40, 0x41, 0x3F, 0x01,// J
0x00, 0x7F, 0x08, 0x14, 0x22, 0x41,// K
0x00, 0x7F, 0x40, 0x40, 0x40, 0x40,// L
0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F,// M
0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F,// N
0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E,// O
0x00, 0x7F, 0x09, 0x09, 0x09, 0x06,// P
0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E,// Q
0x00, 0x7F, 0x09, 0x19, 0x29, 0x46,// R
0x00, 0x46, 0x49, 0x49, 0x49, 0x31,// S
0x00, 0x01, 0x01, 0x7F, 0x01, 0x01,// T
0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F,// U
0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F,// V
0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F,// W
0x00, 0x63, 0x14, 0x08, 0x14, 0x63,// X
0x00, 0x07, 0x08, 0x70, 0x08, 0x07,// Y
0x00, 0x61, 0x51, 0x49, 0x45, 0x43,// Z
0x00, 0x00, 0x7F, 0x41, 0x41, 0x00,// [
0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55,// 55
0x00, 0x00, 0x41, 0x41, 0x7F, 0x00,// ]
0x00, 0x04, 0x02, 0x01, 0x02, 0x04,// ^
0x00, 0x40, 0x40, 0x40, 0x40, 0x40,// _
0x00, 0x00, 0x01, 0x02, 0x04, 0x00,// '
0x00, 0x20, 0x54, 0x54, 0x54, 0x78,// a
0x00, 0x7F, 0x48, 0x44, 0x44, 0x38,// b
0x00, 0x38, 0x44, 0x44, 0x44, 0x20,// c
0x00, 0x38, 0x44, 0x44, 0x48, 0x7F,// d
0x00, 0x38, 0x54, 0x54, 0x54, 0x18,// e
0x00, 0x08, 0x7E, 0x09, 0x01, 0x02,// f
0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C,// g
0x00, 0x7F, 0x08, 0x04, 0x04, 0x78,// h
0x00, 0x00, 0x44, 0x7D, 0x40, 0x00,// i
0x00, 0x40, 0x80, 0x84, 0x7D, 0x00,// j
0x00, 0x7F, 0x10, 0x28, 0x44, 0x00,// k
0x00, 0x00, 0x41, 0x7F, 0x40, 0x00,// l
0x00, 0x7C, 0x04, 0x18, 0x04, 0x78,// m
0x00, 0x7C, 0x08, 0x04, 0x04, 0x78,// n
0x00, 0x38, 0x44, 0x44, 0x44, 0x38,// o
0x00, 0xFC, 0x24, 0x24, 0x24, 0x18,// p
0x00, 0x18, 0x24, 0x24, 0x18, 0xFC,// q
0x00, 0x7C, 0x08, 0x04, 0x04, 0x08,// r
0x00, 0x48, 0x54, 0x54, 0x54, 0x20,// s
0x00, 0x04, 0x3F, 0x44, 0x40, 0x20,// t
0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C,// u
0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C,// v
0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C,// w
0x00, 0x44, 0x28, 0x10, 0x28, 0x44,// x
0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C,// y
0x00, 0x44, 0x64, 0x54, 0x4C, 0x44,// z
0x14, 0x14, 0x14, 0x14, 0x14, 0x14,// horiz lines
};#if 1
unsigned char BMP[] =
{
/*--  调入了一幅图像:C:\Users\Administrator\Desktop\图片2.bmp  --*/
/*--  宽度x高度=128x64  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xF0,0xF8,0xF8,0xF8,0xF8,0xF0,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xC0,0x00,
0x00,0x00,0x00,0xE0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0x00,0x00,0x00,0x00,0x80,
0xC0,0xE0,0xF0,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0xE0,0xC0,0x80,0x00,
0x00,0x00,0x00,0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0x00,0x00,0x00,0x00,0x00,0xF0,
0xF8,0xF8,0xF8,0xF8,0xF8,0xF8,0xF0,0x00,0x00,0x00,0x00,0x80,0xE0,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0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x3F,0x3F,0x7F,0x7F,0x78,0x78,0x7B,0x7B,0x7B,
0x7B,0x7B,0x7B,0x78,0x78,0x7B,0x7B,0x7B,0x7B,0x7B,0x7B,0x78,0x7B,0x7B,0x7B,0x7B,
0x7B,0x7B,0x78,0x78,0x7B,0x7B,0x7B,0x7B,0x7B,0x7B,0x78,0x78,0x78,0x78,0x78,0x78,
0x78,0x78,0x7F,0x7F,0x7F,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
#endif
void Draw_BMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]);static void _itoa(unsigned int uiNum, unsigned char *buf, unsigned char uiRadix)
{unsigned char c, i;unsigned char *p, rst[32];p = rst;for (i = 0; i < 32; i++, p++){/* Isolate a digit */c = uiNum % uiRadix;/* Convert to Ascii */*p = c + ((c < 10) ? '0' : '7');uiNum /= uiRadix;if (!uiNum)break;}for (c = 0; c <= i; c++){/* Reverse character order */*buf++ = *p--;}*buf = '\0';
}static unsigned char * _ltoa(unsigned long l, unsigned char *buf, unsigned char radix)
{
#if defined (__TI_COMPILER_VERSION)return ( (unsigned char*)ltoa( l, (char *)buf ) );
#elif defined( __GNUC__ )return ( (char*)ltoa( l, buf, radix ) );
#elseunsigned char tmp1[10] = "", tmp2[10] = "", tmp3[10] = "";unsigned short num1, num2, num3;unsigned char i;buf[0] = '\0';if ( radix == 10 ){num1 = l % 10000;num2 = (l / 10000) % 10000;num3 = (unsigned short)(l / 100000000);if (num3) _itoa(num3, tmp3, 10);if (num2) _itoa(num2, tmp2, 10);if (num1) _itoa(num1, tmp1, 10);if (num3){strcpy((char*)buf, (char const*)tmp3);for (i = 0; i < 4 - strlen((char const*)tmp2); i++)strcat((char*)buf, "0");}strcat((char*)buf, (char const*)tmp2);if (num3 || num2){for (i = 0; i < 4 - strlen((char const*)tmp1); i++)strcat((char*)buf, "0");}strcat((char*)buf, (char const*)tmp1);if (!num3 && !num2 && !num1)strcpy((char*)buf, "0");}else if ( radix == 16 ){num1 = l & 0x0000FFFF;num2 = l >> 16;if (num2) _itoa(num2, tmp2, 16);if (num1) _itoa(num1, tmp1, 16);if (num2){strcpy((char*)buf,(char const*)tmp2);for (i = 0; i < 4 - strlen((char const*)tmp1); i++)strcat((char*)buf, "0");}strcat((char*)buf, (char const*)tmp1);if (!num2 && !num1)strcpy((char*)buf, "0");}elsereturn NULL;return buf;
#endif
}/*********************LCD 延时1ms************************************/
void LCD_DLY_ms(unsigned int ms)
{                         unsigned int a;while(ms){a=1800;while(a--);ms--;}return;
}/*********************LCD写数据************************************/
void LCD_WrDat(unsigned char dat)
{unsigned char i=8, temp=0;GPIOPinWrite(LCD_DC, 1);  for(i=0;i<8;i++) //发送一个八位数据 {GPIOPinWrite(LCD_SCL, 0);  temp = dat&0x80;if (temp == 0){GPIOPinWrite(LCD_SDA, 0);}else{GPIOPinWrite(LCD_SDA, 1);}GPIOPinWrite(LCD_SCL, 1);       dat<<=1;    }
}
/*********************LCD写命令************************************/
void LCD_WrCmd(unsigned char cmd)
{unsigned char i=8, temp=0;GPIOPinWrite(LCD_DC, 0);  for(i=0;i<8;i++) //发送一个八位数据 { GPIOPinWrite(LCD_SCL, 0);  temp = cmd&0x80;if (temp == 0){GPIOPinWrite(LCD_SDA, 0);}else{GPIOPinWrite(LCD_SDA, 1);}GPIOPinWrite(LCD_SCL, 1);  cmd<<=1;;        }
}
/*********************LCD 设置坐标************************************/
void LCD_Set_Pos(unsigned char x, unsigned char y)
{ LCD_WrCmd(0xb0+y);LCD_WrCmd(((x&0xf0)>>4)|0x10);LCD_WrCmd((x&0x0f)|0x01);
}
/*********************LCD全屏************************************/
void LCD_Fill(unsigned char bmp_dat)
{unsigned char y,x;for(y=0;y<8;y++){LCD_WrCmd(0xb0+y);LCD_WrCmd(0x01);LCD_WrCmd(0x10);for(x=0;x<X_WIDTH;x++)LCD_WrDat(bmp_dat);}
}/***************功能描述:行填充, y为页范围0~7****************/
void LCD_FillLine(unsigned char y,unsigned char ch)
{unsigned char x;    LCD_WrCmd(0xb0+y);LCD_WrCmd(0x01);LCD_WrCmd(0x10); for(x=0;x<X_WIDTH;x++)LCD_WrDat(ch);
}/*********************LCD复位************************************/
void LCD_CLS(void)
{unsigned char y,x;    for(y=0;y<8;y++){LCD_WrCmd(0xb0+y);LCD_WrCmd(0x01);LCD_WrCmd(0x10); for(x=0;x<X_WIDTH;x++)LCD_WrDat(0);}
}
/*********************LCD初始化************************************/
void HalLcd_HW_Init(void)
{  GPIODirModeSet(LCD_SCL, GPIO_DIR_MODE_OUT);GPIODirModeSet(LCD_SDA, GPIO_DIR_MODE_OUT);GPIODirModeSet(LCD_RST, GPIO_DIR_MODE_OUT);GPIODirModeSet(LCD_DC, GPIO_DIR_MODE_OUT);GPIOPinWrite(LCD_SCL, 1);  GPIOPinWrite(LCD_RST, 0);LCD_DLY_ms(250);GPIOPinWrite(LCD_RST, 1);      //从上电到下面开始初始化要有足够的时间,即等待RC复位完毕   LCD_WrCmd(0xae);//--turn off oled panelLCD_WrCmd(0x00);//---set low column addressLCD_WrCmd(0x10);//---set high column addressLCD_WrCmd(0x40);//--set start line address  Set Mapping RAM Display Start Line (0x00~0x3F)LCD_WrCmd(0x81);//--set contrast control registerLCD_WrCmd(0xcf); // Set SEG Output Current BrightnessLCD_WrCmd(0xa1);//--Set SEG/Column Mapping     0xa0左右反置 0xa1正常LCD_WrCmd(0xc8);//Set COM/Row Scan Direction   0xc0上下反置 0xc8正常LCD_WrCmd(0xa6);//--set normal displayLCD_WrCmd(0xa8);//--set multiplex ratio(1 to 64)LCD_WrCmd(0x3f);//--1/64 dutyLCD_WrCmd(0xd3);//-set display offset    Shift Mapping RAM Counter (0x00~0x3F)LCD_WrCmd(0x00);//-not offsetLCD_WrCmd(0xd5);//--set display clock divide ratio/oscillator frequencyLCD_WrCmd(0x80);//--set divide ratio, Set Clock as 100 Frames/SecLCD_WrCmd(0xd9);//--set pre-charge periodLCD_WrCmd(0xf1);//Set Pre-Charge as 15 Clocks & Discharge as 1 ClockLCD_WrCmd(0xda);//--set com pins hardware configurationLCD_WrCmd(0x12);LCD_WrCmd(0xdb);//--set vcomhLCD_WrCmd(0x40);//Set VCOM Deselect LevelLCD_WrCmd(0x20);//-Set Page Addressing Mode (0x00/0x01/0x02)LCD_WrCmd(0x02);//LCD_WrCmd(0x8d);//--set Charge Pump enable/disableLCD_WrCmd(0x14);//--set(0x10) disableLCD_WrCmd(0xa4);// Disable Entire Display On (0xa4/0xa5)LCD_WrCmd(0xa6);// Disable Inverse Display On (0xa6/a7) LCD_WrCmd(0xaf);//--turn on oled panelLCD_Fill(0x00); //初始成黑屏LCD_Set_Pos(0,0);   }
/***************功能描述:显示6*8一组标准ASCII字符串    显示的坐标(x,y),y为页范围0~7****************/
void LCD_P6x8Str(unsigned char x, unsigned char y,unsigned char ch[])
{unsigned char c=0,i=0,j=0;      while (ch[j]!='\0'){    c =ch[j]-32;if(x>126){x=0;y++;}LCD_Set_Pos(x,y);  if(c > 0 && c < 92){for(i=0;i<6;i++)     LCD_WrDat(F6x8[c][i]);  }x+=6;j++;}
}/***********功能描述:显示一行ascii 码?无显示的点阵显示黑色,     y为页的范围0~7*****************/
void HalLcd_HW_WriteLine(unsigned char line, const char *pText)
{LCD_FillLine(line, 0);                            //先把这一行显示成黑色LCD_P6x8Str(0, line, (unsigned char *)pText);
}#ifdef LCD_SUPPORT
/*******************功能描述:显示8*16一组标准ASCII字符串     显示的坐标(x,y),y为页范围0~7****************/
void LCD_P8x16Str(unsigned char x, unsigned char y,unsigned char ch[])
{unsigned char c=0,i=0,j=0;while (ch[j]!='\0'){    c =ch[j]-32;if(x>120){x=0;y++;}LCD_Set_Pos(x,y);    for(i=0;i<8;i++)     LCD_WrDat(F8X16[c*16+i]);LCD_Set_Pos(x,y+1);    for(i=0;i<8;i++)     LCD_WrDat(F8X16[c*16+i+8]);  x+=8;j++;}
}
/*****************功能描述:显示16*16点阵  显示的坐标(x,y),y为页范围0~7****************************/
void LCD_P16x16Ch(unsigned char x, unsigned char y, unsigned char N)
{unsigned char wm=0;unsigned int adder=32*N;  //      LCD_Set_Pos(x , y);for(wm = 0;wm < 16;wm++)  //             {LCD_WrDat(F16x16[adder]);    adder += 1;}      LCD_Set_Pos(x,y + 1); for(wm = 0;wm < 16;wm++) //         {LCD_WrDat(F16x16[adder]);adder += 1;}
}/***********功能描述:显示显示BMP图片128×64起始点坐标(x,y),x的范围0~127,y为页的范围0~7*****************/
void Draw_BMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[])
{     unsigned int j=0;unsigned char x,y;if(y1%8==0) y=y1/8;      else y=y1/8+1;for(y=y0;y<y1;y++){LCD_Set_Pos(x0,y);                for(x=x0;x<x1;x++){      LCD_WrDat(BMP[j++]);            }}
}
#endif/**************************************************************************************************
z-stack代码,未修改**************************************************************************************************/
void HalLcdInit(void)
{
#if (HAL_LCD == TRUE)HalLcd_HW_Init();
#endif
}void Draw_AmoMcu_Logo()
{Draw_BMP(0,0,128, 8,BMP);
}/**************************************************************************************************                    LCD EMULATION FUNCTIONS** Some evaluation boards are equipped with Liquid Crystal Displays* (LCD) which may be used to display diagnostic information. These* functions provide LCD emulation, sending the diagnostic strings* to Z-Tool via the RS232 serial port. These functions are enabled* when the "LCD_SUPPORTED" compiler flag is placed in the makefile.** Most applications update both lines (1 and 2) of the LCD whenever* text is posted to the device. This emulator assumes that line 1 is* updated first (saved locally) and the formatting and send operation* is triggered by receipt of line 2. Nothing will be transmitted if* only line 1 is updated.**************************************************************************************************//**************************************************************************************************
z-stack代码,未修改**************************************************************************************************/
void HalLcdWriteString ( char *str, uint8 option)
{#ifdef LCD_TO_UARTUART_WriteTransport ( (uint8*)str, strlen(str)); UART_WriteTransport ("\r\n",2);
#endif#if (HAL_LCD == TRUE)uint8 strLen = 0;//uint8 totalLen = 0;//uint8 *buf;uint8 tmpLen;if ( Lcd_Line1 == NULL ){//Lcd_Line1 = osal_mem_alloc( HAL_LCD_MAX_CHARS+1 );HalLcdWriteString( "TexasInstruments", 1 );}strLen = (uint8)strlen( (char*)str );/* Check boundries */if ( strLen > HAL_LCD_MAX_CHARS )strLen = HAL_LCD_MAX_CHARS;if ( option == 0 ){/* Line 1 gets saved for later */memcpy( Lcd_Line1, str, strLen );Lcd_Line1[strLen] = '\0';}else{char buf[64];/* Line 2 triggers action */tmpLen = (uint8)strlen( (char*)Lcd_Line1 );//totalLen =  tmpLen + 1 + strLen + 1;//buf = osal_mem_alloc( totalLen );if ( buf != NULL ){/* Concatenate strings */memcpy( buf, Lcd_Line1, tmpLen );buf[tmpLen++] = ' ';memcpy( &buf[tmpLen], str, strLen );buf[tmpLen+strLen] = '\0';/* Send it out */
#if defined (ZTOOL_P1) || defined (ZTOOL_P2)#if defined(SERIAL_DEBUG_SUPPORTED)debug_str( (uint8*)buf );
#endif //LCD_SUPPORTED#endif //ZTOOL_P1/* Free mem *///osal_mem_free( buf );}}/* Display the string */HalLcd_HW_WriteLine (option, str);#endif //HAL_LCD}/*************************************************************************************************** @fn      HalLcdWriteValue** @brief   Write a value to the LCD,向lcd指定行写入一个32位的值** @param   value  - value that will be displayed,需要显示的32位数*          radix  - 8, 10, 16,进制,8进制显示 10进制显示,16进制显示*          option - display options,指定行显示** @return  None**************************************************************************************************/
void HalLcdWriteValue ( uint32 value, const uint8 radix, uint8 option)
{
#if (HAL_LCD == TRUE)uint8 buf[LCD_MAX_BUF];_ltoa( value, &buf[0], radix );HalLcdWriteString( (char*)buf, option );
#endif
}/**************************************************************************************************
z-stack代码,未修改**************************************************************************************************/
void HalLcdWriteScreen( char *line1, char *line2 )
{
#if (HAL_LCD == TRUE)HalLcdWriteString( line1, 1 );HalLcdWriteString( line2, 2 );
#endif
}/**************************************************************************************************
z-stack代码,未修改**************************************************************************************************/
void HalLcdWriteStringValue( char *title, uint16 value, uint8 format, uint8 line )
{
#if (HAL_LCD == TRUE)uint8 tmpLen;uint8 buf[LCD_MAX_BUF] = {0};uint32 err;tmpLen = (uint8)strlen( (char*)title );memcpy( buf, title, tmpLen );buf[tmpLen] = ' ';err = (uint32)(value);_ltoa( err, &buf[tmpLen+1], format );HalLcdWriteString( (char*)buf, line );
#endif
}void HalLcdWriteStringString( char *title, uint8 *string, uint8 line )
{
#if (HAL_LCD == TRUE)char str[128];sprintf(str, "%s%s", title, (char*)string);HalLcdWriteString( (char*)str, line );
#endif
}/**************************************************************************************************
z-stack代码,未修改**************************************************************************************************/
void HalLcdWriteStringValueValue( char *title, uint16 value1, uint8 format1,uint16 value2, uint8 format2, uint8 line )
{#if (HAL_LCD == TRUE)uint8 tmpLen;uint8 buf[LCD_MAX_BUF];uint32 err;tmpLen = (uint8)strlen( (char*)title );if ( tmpLen ){memcpy( buf, title, tmpLen );buf[tmpLen++] = ' ';}err = (uint32)(value1);_ltoa( err, &buf[tmpLen], format1 );tmpLen = (uint8)strlen( (char*)buf );buf[tmpLen++] = ',';buf[tmpLen++] = ' ';err = (uint32)(value2);_ltoa( err, &buf[tmpLen], format2 );HalLcdWriteString( (char *)buf, line );      #endif
}/**************************************************************************************************
z-stack代码,未修改**************************************************************************************************/
void HalLcdDisplayPercentBar( char *title, uint8 value )
{
#if (HAL_LCD == TRUE)uint8 percent;uint8 leftOver;uint8 buf[17];uint32 err;uint8 x;/* Write the title: */HalLcdWriteString( title, 0 );if ( value > 100 )value = 100;/* convert to blocks */percent = (uint8)(value / 10);leftOver = (uint8)(value % 10);/* Make window */memcpy( buf, "[          ]  ", 15 );for ( x = 0; x < percent; x ++ ){buf[1+x] = '>';}if ( leftOver >= 5 )buf[1+x] = '+';err = (uint32)value;_ltoa( err, (uint8*)&buf[13], 10 );HalLcdWriteString( (char*)buf, 1 );#endif}/********************************************************************** @fn      Board_openLCD** @brief   Open LCD peripheral on SRF06EB.** @param   none** @return  void*/
void Board_openLCD(void)
{
#ifdef TI_DRIVERS_LCD_INCLUDEDHalLcd_HW_Init();
#endif
}/********************************************************************** @fn      Board_writeString** @brief   Write a string on the LCD display.** @param   str - string to print* @param   line - line (page) to write (0-7)** @return  void*/
void Board_writeString(char *str, uint8_t line)
{
#ifdef TI_DRIVERS_LCD_INCLUDEDHalLcdWriteString( (char*)str, line );
#endif
}/********************************************************************** @fn      Board_writeStringValue** @brief   Write a string and value on the LCD display.** @param   str - string to print* @param   value - value to print* @param   format - base of the value to print (2,8,16 etc)* @param   line - line (page) to write (0-7)** @return  void*/
void Board_writeStringValue(char *str, uint32_t value, uint8_t format,uint8_t line)
{
#ifdef TI_DRIVERS_LCD_INCLUDEDHalLcdWriteStringValue( str, value, format, line );
#endif
}
#else
// LCD parameter
static LCD_Handle lcdHandle = NULL;#ifdef TI_DRIVERS_LCD_INCLUDED
// LCD pin table
PIN_Config LCDPinTable[] = {Board_3V3_EN     | PIN_GPIO_OUTPUT_EN | PIN_GPIO_HIGH  | PIN_PUSHPULL,  // Enable 3V3 domain. Need to be high for LCD to work.PIN_TERMINATE                                                           // Terminate list
};// LCD pin state
PIN_State LCDPinState;// LCD pin handle
PIN_Handle hLCDPins;
#endif //TI_DRIVERS_LCD_INCLUDEDChar lcdBuffer0[LCD_BYTES] = {0};LCD_Buffer lcdBuffers[] = {{lcdBuffer0, LCD_BYTES, NULL},};/********************************************************************** PUBLIC FUNCTIONS*//********************************************************************** @fn      Board_openLCD** @brief   Open LCD peripheral on SRF06EB.** @param   none** @return  void*/
void Board_openLCD(void)
{
#ifdef TI_DRIVERS_LCD_INCLUDED//Enable the 3V3 demain for the LCDhLCDPins = PIN_open(&LCDPinState, LCDPinTable);LCD_Params lcdParams;LCD_Params_init(&lcdParams);// Open LCD peripherallcdHandle = LCD_open(&lcdBuffers[0], 1, &lcdParams);LCD_bufferClear(lcdHandle, 0);LCD_update(lcdHandle, 0);
#endif
}/********************************************************************** @fn      Board_writeString** @brief   Write a string on the LCD display.** @param   str - string to print* @param   line - line (page) to write (0-7)** @return  void*/
void Board_writeString(char *str, uint8_t line)
{if (lcdHandle != NULL){LCD_bufferClearPage(lcdHandle, 0, (LCD_Page)line);LCD_bufferPrintString(lcdHandle, 0, str, 0, (LCD_Page)line);LCD_update(lcdHandle, 0);}
}/********************************************************************** @fn      Board_writeStringValue** @brief   Write a string and value on the LCD display.** @param   str - string to print* @param   value - value to print* @param   format - base of the value to print (2,8,16 etc)* @param   line - line (page) to write (0-7)** @return  void*/
void Board_writeStringValue(char *str, uint32_t value, uint8_t format,uint8_t line)
{if (lcdHandle != NULL){// Write string and 32-bit numberLCD_writeLine(lcdHandle, 0, str, value, format, line);}
}
#endif
/*********************************************************************
*********************************************************************/

使用amo编写的驱动。

3、添加测试代码(SimpleBLECentral.c的SimpleBLECentral_Init函数中)
  //香瓜LCD初始化Board_writeString("Name:GUA", LCD_PAGE6);Board_writeStringValue("Age:", 27, 10, LCD_PAGE7);  

简单使用两个最常用的LCD显示函数,一个用于纯字符串打印,一个用于字符串与数据相结合。

五、实验结果
如上图,显示屏一共有8行,上面三行是工程中自己添加的显示,而下面两行则是香瓜在初始化时添加的测试代码。
因此,实验成功。

【BLE-CC2640】CC2640之OLED相关推荐

  1. CC2640 SNV

    转自:http://blog.csdn.net/feilusia/article/details/57374684 一.简介 本文以SimpleBLEPeripheral工程为例,介绍如何使用SNV. ...

  2. 【BLE-CC2640】CC2640之SNV

    本篇博文最后修改时间:2017年06月02日,06:40. 一.简介 本文以SimpleBLEPeripheral工程为例,介绍如何使用SNV. 二.实验平台 协议栈版本:ble_cc26xx_2_0 ...

  3. BLE】CC2541之通过RSSI测距

    本篇博文最后修改时间:2017年01月06日,11:06. 一.简介 本文介绍如何在SimpleBLEPeripheral工程中,通过RSSI粗略测距. 二.实验平台 协议栈版本:BLE-CC254x ...

  4. 【BLE】CC2541之Large OAD

    本篇博文最后修改时间:2017年05月19日,03:33. 一.简介 本篇以SimpleBLEPeripheral工程为例,介绍如何进行Large OAD升级. 二.实验平台 协议栈版本:BLE-CC ...

  5. 【BLE】CC2541与CC2540的区别

    本篇博文最后修改时间:2017年01月06日,11:06. 一.简介 本文介绍CC2541与CC2540的区别. 二.实验平台 协议栈版本:BLE-CC254x-1.4.0 编译软件:IAR 8.20 ...

  6. 【BLE】CC2541之SBL

    本篇博文最后修改时间:2016年12月23日,13:53. 一.简介 本文以SimpleBLEPeripheral工程为例,介绍如何使用串口方式下载. 二.实验平台 协议栈版本:BLE-CC254x- ...

  7. 【BLE】CC2541之OAD

    本篇博文最后修改时间:2017年01月06日,11:06. 一.简介 本文以SimpleBLEPeripheral工程为例,介绍如何进行OAD升级. 二.实验平台 协议栈版本:BLE-CC254x-1 ...

  8. 【BLE】CC2541之动态广播加密数据

    本篇博文最后修改时间:2017年03月30日,16:33. 一.简介 本文以SimpleBLEPeripheral为例,每5S来动态更新广播一次16字节的加密数据,其中有效数据为1个字节的计数值. 二 ...

  9. 【BLE】CC2541之通信协议

    本篇博文最后修改时间:2016年12月12日,10:51. 一.简介 本文以SimpleBLEPeripheral工程为例,介绍如何在一个可读.可写.可通知.20字节长的特征值char6基础上,添加一 ...

  10. 【BLE】CC2541之发现服务与特征值

    本篇博文最后修改时间:2017年01月06日,11:06. 一.简介 本文以SimpleBLECentral工程为例,解析CC2541作为主机时是如何发现从机的服务和特征值的. 二.实验平台 协议栈版 ...

最新文章

  1. 面试字节跳动,我被怼了……
  2. 为什么忘记commit也会造成select查询的性能问题
  3. CodeForces - 222C Reducing Fractions(唯一分解定理)
  4. php mysql having_having的用法
  5. html追加到末尾,css – wkhtmltopdf – 将内容添加到最后一页的底部
  6. 为什么越来越多的人尝试做自媒体
  7. java解压zip和rar文件
  8. 使用Unison 同步文件
  9. 云南 贵州大旱灾情百年一遇 经济损失惨重
  10. OSChina 周一乱弹 —— 今天下班带你去放松咧
  11. 学习篇之数据分析库pandas
  12. 微信小程序隐藏分享按钮
  13. DNS List (台湾的比较不错,推荐使用!)
  14. 素材要VIP咋整?看python大展神通
  15. 银河麒麟/ubuntu 下安装/卸载软件包命令大全
  16. Python爬取链家成都二手房源信息
  17. 微信支付 普通商户版 服务商版 银行服务商版 区别
  18. pytho自动发送微信消息
  19. 《我的世界》Python编程入门(2)Minecraft(我的世界) 游戏简介
  20. Hadoop各种版本的百度网盘下载

热门文章

  1. JavaScript如何打开和使用JavaScript控制台
  2. Day16_IO框架1(File类, IO流, 字节流字符流, IO异常, Properties)
  3. 计算机网速单位是什么,文件大小和网速的单位
  4. iOS永久不掉签名工具,TrollStore超详使用教程
  5. hdu 5698 瞬间移动(2016百度之星 - 初赛(Astar Round2B)——数学题)
  6. discuz 风格模板制作
  7. RSA加密解密及制作软件license
  8. 全新原装 SD3337C SOP8 丝印HXN 升压DC/DC转换器恒流白光LED驱动
  9. IDEA中Maven中mysql-connector-java或者其他依赖包下载不了的问题的解决办法
  10. 关于国际标准书号ISBN