打印
[国产单片机]

【东软载波ESF0654 PDS开发板活动】+ LCD12232

[复制链接]
629|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
Cjy_JDxy|  楼主 | 2019-12-19 19:12 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
今晚捣鼓了一下LCD12232串行。
代码:
#include "main.h"

/** @addtogroup Projects_Examples_MD
  * @{
  */

/** @addtogroup Examples
  * @{
  */
#define uchar unsigned char
#define uint  unsigned int
       
#define CS_0  md_gpio_set_pin_low(CS_GPIO_PORT, CS_GPIO_PIN)
#define CS_1  md_gpio_set_pin_high(CS_GPIO_PORT, CS_GPIO_PIN)
#define SCK_0 md_gpio_set_pin_low(SCK_GPIO_PORT, SCK_GPIO_PIN)
#define SCK_1 md_gpio_set_pin_high(SCK_GPIO_PORT, SCK_GPIO_PIN)

#define SID_0  md_gpio_set_pin_low(SID_GPIO_PORT, SID_GPIO_PIN)
#define SID_1  md_gpio_set_pin_high(SID_GPIO_PORT, SID_GPIO_PIN)
#define SID    md_gpio_get_input_data(SID_GPIO_PORT, SID_GPIO_PIN)
#define KEY  RE2

uchar i=0,j=0;
uchar yemiancount=0;
uchar const  bmp1[]=                                                 
{0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x83,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x83,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x83,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x83,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x20,0x83,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xF8,0x3F,0x82,0x0F,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x30,0x00,0x18,0x01,0x80,0x0C,0x00,0x18,0x60,0x0F,0x00,0x7F,0xC0,0x01,0x81,
0x80,0x18,0x00,0x18,0x00,0xC0,0x07,0xFC,0x7F,0xFC,0xF8,0x30,0x60,0xC0,0xFF,0xC1,
0x87,0xFF,0xC0,0x18,0x0F,0xFC,0x18,0x0C,0x3C,0x60,0x7B,0x60,0x60,0xC0,0xC1,0x81,
0x80,0x30,0x0F,0xFF,0x80,0x18,0x1B,0xEC,0x19,0xF8,0x36,0xC0,0x7F,0xC0,0xFF,0x81,
0x80,0x30,0x00,0x18,0x00,0x30,0x1B,0x6C,0x7E,0x60,0x18,0x18,0x66,0x00,0xC1,0x81,
0x80,0x3F,0x03,0x18,0x00,0x60,0x1B,0x6C,0x1B,0xFC,0xFF,0xB0,0x63,0x00,0xFF,0x81,
0x80,0x33,0x01,0x98,0x00,0xC0,0x1B,0xEC,0x3D,0x98,0x18,0x60,0x79,0x80,0x36,0x01,
0x80,0x63,0x00,0xD8,0x01,0x80,0x1B,0x6C,0x3F,0xF8,0x3D,0xD8,0x6C,0xC1,0xB6,0xC1,
0x80,0x63,0x00,0x18,0x03,0x00,0x1B,0xEC,0x79,0x98,0x7E,0x30,0xC6,0x70,0xF7,0x81,
0x80,0xC3,0x00,0x18,0x07,0x00,0x1B,0x6C,0x79,0xF8,0xDB,0x61,0xB8,0x00,0x77,0x01,
0x81,0x9E,0x00,0x18,0x1D,0xC0,0x18,0x0C,0x19,0x98,0x18,0xC0,0x0E,0x00,0x36,0xC1,
0x83,0x0C,0x00,0x38,0x00,0x7F,0x18,0x1C,0x19,0xB8,0x1B,0x80,0x03,0x03,0xFF,0xE1,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
uchar const bmp2[]=                                                                                                                                                               
{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,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,
0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x0F,0xC0,0x00,0x00,0x00,0x00,0x1C,0x00,0x07,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x0F,0xF1,0xFF,0xFF,0xFC,0x00,0xFE,0x00,0x0D,0xE1,0xFF,0xFF,0xE0,0x00,0x00,0x00,
0x0F,0xFF,0xFF,0xFF,0xFF,0xC3,0xFF,0x00,0x0C,0x7F,0xFF,0xBF,0xFC,0x00,0x00,0x00,
0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x0C,0x00,0x00,0x00,0x1F,0x80,0x00,0x00,
0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x0C,0x00,0x00,0x00,0x03,0xE0,0x00,0x00,
0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x1C,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,
0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x36,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,
0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x62,0x00,0x00,0x00,0x00,0x0E,0x00,0x00,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0xC3,0x00,0x00,0x00,0x00,0x07,0x00,0x00,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x80,0x00,0x00,0x00,0x00,0x03,0x80,0x00,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x01,0x80,0x00,0x00,0x00,0x00,0x01,0x80,0x00,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,
0x7F,0xE3,0xFF,0xFF,0xFF,0xFF,0xFE,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,
0x7F,0xC1,0xFF,0xFF,0xFF,0x83,0xFE,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,
0x7F,0xE1,0xF8,0x00,0x0F,0x83,0xFE,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
0x7F,0xE3,0xF0,0x00,0x03,0x87,0xFF,0x80,0x18,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
0x7F,0xFF,0xE0,0x40,0x81,0xFF,0xFF,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
0x7F,0xFF,0xE0,0xE1,0xC1,0xFF,0xFF,0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
0x7F,0xFF,0xE0,0xC1,0xC1,0xFF,0xFF,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,
0x7F,0xFF,0xE0,0x00,0x81,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
0xFF,0xFF,0xF0,0x00,0x03,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,
0xFF,0xFF,0xFC,0x00,0x0F,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,
0xFF,0xFF,0xFF,0x81,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1E,0x00,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x80,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x1D,0xFE,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x1D,0xFE,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x60,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x1B,0x60,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x19,0xE0,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x80,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,
0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x00,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,
0x3F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x01,0xC0,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0xC0,0x00,0x00,0x00,0x00,0x01,0x80,0x00,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x60,0x00,0x00,0x00,0x00,0x03,0x80,0x00,
0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x70,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
0x0F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFC,0x00,0x38,0x00,0x00,0x00,0x00,0x06,0x00,0x00,
0x07,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x18,0x1F,0x7F,0xFB,0xFE,0x0E,0x00,0x00,
0x07,0xFF,0xFF,0xFF,0xFF,0xE7,0xF8,0x00,0x0C,0x3F,0xFF,0xFF,0xFE,0x18,0x00,0x00,
0x07,0xF8,0x0E,0x00,0x08,0x03,0xF0,0x00,0x0C,0x60,0x00,0x00,0x06,0x30,0x00,0x00,
0x03,0xF8,0x00,0x00,0x00,0x03,0xF0,0x00,0x0E,0x60,0x00,0x00,0x03,0xF0,0x00,0x00,
0x01,0xF0,0x00,0x00,0x00,0x01,0x80,0x00,0x03,0xC0,0x00,0x00,0x01,0xC0,0x00,0x00,
0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};                                                                                                                                                               
uchar const bmp3[]=
{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,0x7F,0x0F,0xC0,0x01,0x81,0xF0,0xF8,0x3C,0x06,0x00,0x0F,0x9E,0xF0,0x00,0x00,
0x00,0x31,0x98,0xC0,0x07,0x83,0x19,0x8C,0x6C,0x0E,0x00,0x18,0xCC,0x60,0x00,0x00,
0x00,0x36,0x18,0xC0,0x01,0x83,0x19,0x8C,0xC0,0x1E,0x00,0x18,0xCC,0x60,0x00,0x00,
0x00,0x36,0x30,0x00,0x01,0x83,0x19,0x8C,0xC0,0x36,0x00,0x18,0xCC,0x60,0x00,0x00,
0x00,0x3E,0x30,0x00,0x01,0x80,0x30,0xD8,0xF8,0x36,0x00,0x01,0x8C,0x60,0x00,0x00,
0x00,0x36,0x30,0x0F,0xF1,0x80,0x30,0x70,0xEC,0x66,0x3F,0xC1,0x8F,0xE0,0x00,0x00,
0x00,0x36,0x30,0x00,0x01,0x80,0x60,0xD8,0xC6,0x66,0x00,0x03,0x0C,0x60,0x00,0x00,
0x00,0x30,0x30,0x00,0x01,0x80,0xC1,0x8C,0xC6,0x7F,0x00,0x06,0x0C,0x60,0x00,0x00,
0x00,0x30,0x18,0xC0,0x01,0x81,0x81,0x8C,0xC6,0x06,0x00,0x0C,0x0C,0x60,0x00,0x00,
0x00,0x30,0x19,0x80,0x01,0x83,0x19,0x8C,0x6C,0x06,0x00,0x18,0xCC,0x60,0x00,0x00,
0x00,0x78,0x0F,0x00,0x07,0xE3,0xF8,0xF8,0x38,0x1F,0x00,0x1F,0xDE,0xF0,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,0x03,0x66,0x00,0x60,0x00,0x18,0x03,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x66,0x00,0x30,0x00,0x0C,0x01,0x83,0x00,0x7F,0xF0,0x00,0x00,0x00,
0x00,0x00,0x1F,0xFF,0xC7,0xFF,0xC3,0xFF,0xF1,0xBF,0xF8,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x66,0x06,0x00,0xC3,0x18,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x66,0x0C,0x01,0x83,0x18,0x06,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1F,0xFF,0xC3,0xFE,0x03,0xFF,0xE3,0xC3,0x01,0xFF,0xFC,0x00,0x00,0x00,
0x00,0x00,0x18,0x61,0x80,0x0C,0x03,0x36,0x00,0xDF,0xE0,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x30,0x63,0x00,0x18,0x03,0x66,0x01,0x9B,0x60,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x07,0xFE,0x00,0x30,0x03,0xFF,0xE1,0x9F,0xE0,0x66,0xC0,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x0F,0xFF,0xE3,0x66,0x01,0x9B,0x60,0x66,0x60,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x00,0x30,0x03,0x06,0x07,0x1B,0x60,0xC6,0x30,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x00,0x30,0x03,0xFF,0xF3,0x1F,0xE1,0x86,0x38,0x00,0x00,0x00,
0x00,0x00,0x06,0x7E,0x00,0x30,0x03,0x06,0x03,0x00,0x03,0x06,0x18,0x00,0x00,0x00,
0x00,0x00,0x06,0x6C,0x00,0x30,0x06,0x06,0x03,0x0C,0xC0,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x00,0xF0,0x06,0x06,0x03,0x0C,0x60,0x1E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x00,0x60,0x0C,0x06,0x03,0x18,0x60,0x0C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x01,0x83,0x80,0x00,0x03,0xFF,0xF8,0xCD,0x80,0x00,0x00,0x00,
0x00,0x00,0x07,0xFE,0x00,0xE3,0x03,0xFF,0xC0,0x00,0x60,0x6D,0x80,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x00,0xC6,0x03,0x00,0xC0,0x00,0x60,0x6F,0xF0,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x0F,0xFF,0xC3,0x00,0xC0,0xFE,0x60,0x19,0x80,0x00,0x00,0x00,
0x00,0x00,0x07,0xFE,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x60,0x01,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x63,0xFF,0xF8,0x00,0x00,0x00,
0x00,0x00,0x0F,0xFF,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x60,0x66,0xC0,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x0F,0xFF,0xE3,0x00,0xC0,0xC6,0x60,0x66,0xC0,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x00,0xC6,0x03,0x00,0xC0,0xFE,0x60,0x6C,0xD8,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x60,0x6C,0xD8,0x00,0x00,0x00,
0x00,0x00,0x0F,0xFF,0x00,0xC6,0x03,0xFF,0xC0,0x00,0x60,0x78,0x78,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x01,0x86,0x03,0x00,0xC0,0x03,0x60,0x60,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x01,0x86,0x03,0x00,0xC0,0x01,0xE0,0xF0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x03,0x06,0x00,0x00,0x00,0x00,0xC1,0x9F,0xFC,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x06,0x06,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,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,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,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,0x00,0x00};
uchar const bmp4[]=
{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,0x7F,0x0F,0xC0,0x01,0x81,0xF0,0xF8,0x3C,0x06,0x00,0x0F,0x9E,0xF0,0x00,0x00,
0x00,0x31,0x98,0xC0,0x07,0x83,0x19,0x8C,0x6C,0x0E,0x00,0x18,0xCC,0x60,0x00,0x00,
0x00,0x36,0x18,0xC0,0x01,0x83,0x19,0x8C,0xC0,0x1E,0x00,0x18,0xCC,0x60,0x00,0x00,
0x00,0x36,0x30,0x00,0x01,0x83,0x19,0x8C,0xC0,0x36,0x00,0x01,0x8C,0x60,0x00,0x00,
0x00,0x3E,0x30,0x00,0x01,0x80,0x30,0xD8,0xF8,0x36,0x00,0x07,0x0C,0x60,0x00,0x00,
0x00,0x36,0x30,0x0F,0xF1,0x80,0x30,0x70,0xEC,0x66,0x3F,0xC1,0x8F,0xE0,0x00,0x00,
0x00,0x36,0x30,0x00,0x01,0x80,0x60,0xD8,0xC6,0x66,0x00,0x00,0xCC,0x60,0x00,0x00,
0x00,0x30,0x30,0x00,0x01,0x80,0xC1,0x8C,0xC6,0x7F,0x00,0x00,0xCC,0x60,0x00,0x00,
0x00,0x30,0x18,0xC0,0x01,0x81,0x81,0x8C,0xC6,0x06,0x00,0x18,0xCC,0x60,0x00,0x00,
0x00,0x30,0x19,0x80,0x01,0x83,0x19,0x8C,0x6C,0x06,0x00,0x19,0x8C,0x60,0x00,0x00,
0x00,0x78,0x0F,0x00,0x07,0xE3,0xF8,0xF8,0x38,0x1F,0x00,0x0F,0x1E,0xF0,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,0x03,0x66,0x00,0x60,0x00,0x18,0x03,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x66,0x00,0x30,0x00,0x0C,0x01,0x83,0x00,0x7F,0xF0,0x00,0x00,0x00,
0x00,0x00,0x1F,0xFF,0xC7,0xFF,0xC3,0xFF,0xF1,0xBF,0xF8,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x66,0x06,0x00,0xC3,0x18,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x66,0x0C,0x01,0x83,0x18,0x06,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1F,0xFF,0xC3,0xFE,0x03,0xFF,0xE3,0xC3,0x01,0xFF,0xFC,0x00,0x00,0x00,
0x00,0x00,0x18,0x61,0x80,0x0C,0x03,0x36,0x00,0xDF,0xE0,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x30,0x63,0x00,0x18,0x03,0x66,0x01,0x9B,0x60,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x07,0xFE,0x00,0x30,0x03,0xFF,0xE1,0x9F,0xE0,0x66,0xC0,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x0F,0xFF,0xE3,0x66,0x01,0x9B,0x60,0x66,0x60,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x00,0x30,0x03,0x06,0x07,0x1B,0x60,0xC6,0x30,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x00,0x30,0x03,0xFF,0xF3,0x1F,0xE1,0x86,0x38,0x00,0x00,0x00,
0x00,0x00,0x06,0x7E,0x00,0x30,0x03,0x06,0x03,0x00,0x03,0x06,0x18,0x00,0x00,0x00,
0x00,0x00,0x06,0x6C,0x00,0x30,0x06,0x06,0x03,0x0C,0xC0,0x06,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x00,0xF0,0x06,0x06,0x03,0x0C,0x60,0x1E,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x00,0x60,0x0C,0x06,0x03,0x18,0x60,0x0C,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x01,0x83,0x80,0x00,0x03,0xFF,0xF8,0xCD,0x80,0x00,0x00,0x00,
0x00,0x00,0x07,0xFE,0x00,0xE3,0x03,0xFF,0xC0,0x00,0x60,0x6D,0x80,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x00,0xC6,0x03,0x00,0xC0,0x00,0x60,0x6F,0xF0,0x00,0x00,0x00,
0x00,0x00,0x06,0x66,0x0F,0xFF,0xC3,0x00,0xC0,0xFE,0x60,0x19,0x80,0x00,0x00,0x00,
0x00,0x00,0x07,0xFE,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x60,0x01,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x63,0xFF,0xF8,0x00,0x00,0x00,
0x00,0x00,0x0F,0xFF,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x60,0x66,0xC0,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x0F,0xFF,0xE3,0x00,0xC0,0xC6,0x60,0x66,0xC0,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x00,0xC6,0x03,0x00,0xC0,0xFE,0x60,0x6C,0xD8,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x00,0xC6,0x03,0x00,0xC0,0xC6,0x60,0x6C,0xD8,0x00,0x00,0x00,
0x00,0x00,0x0F,0xFF,0x00,0xC6,0x03,0xFF,0xC0,0x00,0x60,0x78,0x78,0x00,0x00,0x00,
0x00,0x00,0x0C,0x63,0x01,0x86,0x03,0x00,0xC0,0x03,0x60,0x60,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x01,0x86,0x03,0x00,0xC0,0x01,0xE0,0xF0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x03,0x06,0x00,0x00,0x00,0x00,0xC1,0x9F,0xFC,0x00,0x00,0x00,
0x00,0x00,0x00,0x60,0x06,0x06,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,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,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,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};

void delayus(void)
{
    uchar i;
    for(i=0;i<5;i++);
}

void SID_Input(void)
{
        md_gpio_set_pin_function(SID_GPIO_PORT, SID_GPIO_PIN, GPIO_FUNC_1);
        md_gpio_set_pin_push_pull(SID_GPIO_PORT, SID_GPIO_PIN);
        md_gpio_set_pin_mode_input(SID_GPIO_PORT, SID_GPIO_PIN);
}

void SID_Output(void)
{
        md_gpio_set_pin_function(SID_GPIO_PORT, SID_GPIO_PIN, GPIO_FUNC_1);
        md_gpio_set_pin_push_pull(SID_GPIO_PORT, SID_GPIO_PIN);
        md_gpio_set_pin_mode_output(SID_GPIO_PORT, SID_GPIO_PIN);
}
void SendByte(uchar Dbyte)
{
         uchar i;
         for(i=0;i<8;i++)
         {
                 SCK_0;
                 delayus();
                 if((Dbyte&0x80)==0x80)
                    SID_1;
                 else
                    SID_0;
                 Dbyte=Dbyte<<1;
                 delayus();
                 SCK_1;
                 delayus();
         }
}

uchar ReceiveByte()
{
         uchar i,temp1,temp2;
         temp1=temp2=0;
         //TRISD=0X40;
                                        SID_Input();
         for(i=0;i<20;i++);

         for(i=0;i<8;i++)
         {
                 temp1=temp1<<1;
                 SCK_0;
                 delayus();
                 SCK_1;  
                 delayus();
                 if(SID==1) temp1++;
                 delayus();
         }
         for(i=0;i<8;i++)
         {
                 temp2=temp2<<1;
                 SCK_0;
                 delayus();
                 SCK_1;
                 delayus();
                 if(SID==1) temp2++;
                 delayus();
         }
         SID_Output();
         for(i=0;i<20;i++);
         return ((0xf0&temp1)+(0x0f&temp2));
}

void busy( )
{
         do SendByte(0xfc);     //11111,RW(1),RS(0),0
         while(0x80&ReceiveByte());
}

void write_cmd( uchar Cbyte )
{
         CS_1;
         delayus();
         busy();
         SendByte(0xf8);          //11111,RW(0),RS(0),0
                                        SendByte(0xf0&Cbyte);
         SendByte(0xf0&Cbyte<<4);

         CS_0;
         delayus();
}

void write_data( uchar Dbyte )
{
         CS_1;
         delayus();
         busy();
         SendByte(0xfa);          //11111,RW(0),RS(1),0
         SendByte(0xf0&Dbyte);
                 SendByte(0xf0&Dbyte<<4);

         CS_0;
         delayus();
}

uchar ReadData( )
{
         busy();
         SendByte(0xfe);          //11111,RW(1),RS(1),0
         return ReceiveByte();
}

void delay(uint MS)
{
  uint i,j;
  for (i=0;i<MS;i++)
  for(j=0;j<10;j++);
}

void LcmInit( )
{
         write_cmd(0x30);
                 delay(100);
         write_cmd(0x03);
                 delay(100);
         write_cmd(0x0C);
                 delay(100);
         write_cmd(0x01);
                 delay(100);
         write_cmd(0x06);
                 delay(100);
}

void LcmClearTXT( )
{
         uchar i;
         write_cmd(0x30);
         write_cmd(0x80);
         for(i=0;i<64;i++)
         write_data(0x20);
}

void LcmClearBMP()
{
         uchar i,j;
         write_cmd(0x34);
         write_cmd(0x36);
         for(i=0;i<32;i++)
         {
                 write_cmd(0x80+i);
                 write_cmd(0x80);
                 for(j=0;j<32;j++)
                 write_data(0);
         }
}

void PUTstring(uchar row,uchar col,uchar *puts)
{
       write_cmd(0x30);
      switch(row)
      {
        case 0: write_cmd(0x80+col);break;
        case 1: write_cmd(0x90+col);break;
        case 2: write_cmd(0x88+col);break;
        case 3: write_cmd(0x98+col);break;
       }
         while(*puts != '\0')
         {
            write_data(*puts);
            puts++;
         }
}                 
void PUTZIZAO(uchar row,uchar col,uchar *puts)
{       
            uchar i=0,j=0,k=0;
        write_cmd(0x34);
        write_cmd(0x36);
        for(i=0;i<16;i++)
                {
            write_cmd(0x80+i+row);
            write_cmd(0x80+col);
            write_data(puts[2*k]);  
            write_data(puts[2*k+1]);  
            k++;
                }
       
}

void PUTBMP(uchar *puts)
{
         uint x=0,y=0;
         uchar i,j;
         write_cmd(0x34);
         write_cmd(0x36);
         for(i=0;i<32;i++)
         {
                 write_cmd(0x80+i);
                 write_cmd(0x80);
                 for(j=0;j<8;j++)   
                 {                     
                     write_data(puts[2*x]);  
                                         write_data(puts[2*x+1]);  
                     x++;
                 }                          
                                 write_cmd(0x80+i);
                 write_cmd(0x88);
                 for(j=0;j<8;j++)   
                 {                     
                     write_data(puts[2*y+512]);  
                                         write_data(puts[2*y+513]);  
                     y++;
                 }
         }
}

void  oshuxian()
{
                write_cmd(0x34);
            write_cmd(0x36);
            for(i=0;i<32;i++)   
         {  //write_cmd(0x36);
            write_cmd(0x80+i);
                        write_cmd(0x80);      
            //write_cmd(0x30);
            for(j=0;j<32;j++)            
                        write_data(0xCC);  
         }
                write_cmd(0x32);                       
}               
                       
void jishuxian()
{
                write_cmd(0x34);
            write_cmd(0x36);
               for(i=0;i<32;i++)        
         {  
             //write_cmd(0x36);
            write_cmd(i+0x80);        
                        write_cmd(0x80);            
            //write_cmd(0x30);
                        for(j=0;j<32;j++)  
                        write_data(0x33);
          }
                write_cmd(0x32);                               
}

void  ohengxian()
{               
        LcmClearTXT();
         write_cmd(0x34);
             write_cmd(0x36);       
         for(i=0;i<16;i++)
         {                       
                    //write_cmd(0x36);
                                         write_cmd(0x80+2*i);  
                                         write_cmd(0x80);       
                                         //write_cmd(0x30);
                     for(j=0;j<32;j++)write_data(0xFF);     

                                         //write_cmd(0x36);
                                         write_cmd(0x80+2*i+1);  
                                         write_cmd(0x80);       
                                         //write_cmd(0x30);
                     for(j=0;j<32;j++)write_data(0);   
         }
                 write_cmd(0x32);
}                                       

void  dianxian()
{               
        LcmClearTXT();
             write_cmd(0x34);
             write_cmd(0x36);
             for(i=0;i<16;i++)
         {                         //write_cmd(0x36);
                                         write_cmd(0x80+2*i);  
                                         write_cmd(0x80);       
                                         //write_cmd(0x30);
                     for(j=0;j<32;j++)write_data(0XAA);     

                                         //write_cmd(0x36);
                                         write_cmd(0x80+2*i+1);  
                                         write_cmd(0x80);       
                                         //write_cmd(0x30);
                     for(j=0;j<32;j++)write_data(0x55);   
         }
                 write_cmd(0x32);
   }

void hanzi()
{  
   LcmClearBMP();
   write_cmd(0x30);
   PUTstring(0,0,"ÉîÛÚ·½´çµç×ÓÓÐÏÞ");   
   PUTstring(1,0,"¹«Ë¾ÄÏɽÇøÎ÷ÀöÄÏ");       
   PUTstring(2,0,"Í幤ҵÇø10¶°4 Â¥");   
   PUTstring(3,0,"·½´çÖ®¼ä¾«²Ê¾¡ÏÔ");
}

void  jihengxian()
{
         write_cmd(0x34);
             write_cmd(0x36);       
         for(i=0;i<16;i++)
         {                       
                    //write_cmd(0x36);
                                         write_cmd(0x80+2*i);  
                                         write_cmd(0x80);       
                                         //write_cmd(0x30);
                     for(j=0;j<32;j++)write_data(0);     

                                         //write_cmd(0x36);
                                         write_cmd(0x80+2*i+1);  
                                         write_cmd(0x80);       
                                         //write_cmd(0x30);
                     for(j=0;j<32;j++)write_data(0xFF);   
         }
                 write_cmd(0x32);
}
/**
  * @brief  This function configures GPIO
  * @param  None
  * @retval None
  */
void config_gpio(void)
{
        md_gpio_set_pin_function(SCK_GPIO_PORT, SCK_GPIO_PIN, GPIO_FUNC_1);
        md_gpio_set_pin_push_pull(SCK_GPIO_PORT, SCK_GPIO_PIN);
        md_gpio_set_pin_mode_output(SCK_GPIO_PORT, SCK_GPIO_PIN);
       
        md_gpio_set_pin_function(SID_GPIO_PORT, SID_GPIO_PIN, GPIO_FUNC_1);
        md_gpio_set_pin_push_pull(SID_GPIO_PORT, SID_GPIO_PIN);
        md_gpio_set_pin_mode_output(SID_GPIO_PORT, SID_GPIO_PIN);
       
        md_gpio_set_pin_function(CS_GPIO_PORT, CS_GPIO_PIN, GPIO_FUNC_1);
        md_gpio_set_pin_push_pull(CS_GPIO_PORT, CS_GPIO_PIN);
        md_gpio_set_pin_mode_output(CS_GPIO_PORT, CS_GPIO_PIN);
       
        md_gpio_set_pin_function(LED2_GPIO_PORT, LED2_GPIO_PIN, GPIO_FUNC_1);
        md_gpio_set_pin_push_pull(LED2_GPIO_PORT, LED2_GPIO_PIN);
        md_gpio_set_pin_mode_output(LED2_GPIO_PORT, LED2_GPIO_PIN);
}

/**
  * @brief  Test main function
  * @retval Status.
  */
int main()
{
        md_init_1ms_tick();
        config_gpio();
        LcmInit();
        LcmClearTXT();
        LcmClearBMP();
        hanzi();     
        while (1)
        {
                md_delay_1ms(1000);
                //md_gpio_set_pin_low(LOAD_GPIO_PORT,LOAD_GPIO_PIN);
                md_gpio_toggle_pin_output(LED2_GPIO_PORT, LED2_GPIO_PIN);
//                WriteWord (DisplayTest,TextEnd);  // ????????
//                WriteWord (Digit0,0);
//                WriteWord (Digit1,1);
//                WriteWord (Digit2,2);
//                WriteWord (Digit3,3);
                //SendChar (0X55);
        }
}

效果图:

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:绿水本无忧因风皱面,青山原不老为雪白头。

553

主题

3530

帖子

19

粉丝