杭州清达光电技术有限公司

主营:液晶模块,OLED显示模块,LCM,超低温液晶,军工显示屏,OLED显示屏,串口显示屏,彩屏模组,耐高温高湿显示屏,带字库液晶,RS232显示屏,UART显示屏

  • 黄金会员
  • 8
您现在的位置:杭州清达光电技术有限公司首页 > UC1698U控制器HGO1601603V5-F-LWH-LSV测试代码
VIP会员 8
  • 经营模式:生产型
  • 所在地区:浙江 - 杭州
  • 企业类别:私营有限责任公司
公司相册
站内搜索
UC1698U控制器HGO1601603V5-F-LWH-LSV测试代码

UC1698U控制器HGO1601603V5-F-LWH-LSV测试代码

UC1698U控制器HGO1601603V5-F-LWH-LSV测试代码

/*
LCD controller uc1698
SEGMENT SEG112~SEG271
since the segment is dissymmetrical,do not use X-mirror
extern MPU Crystal:20M
*/
#include<>
#define uchar unsigned char
#define uint unsigned int
sbit cd=P3^4;
sbit rst=P3^5;
sbit cs=P3^2;
sbit wr=P3^0;
sbit rd=P3^1;
#define dport P1
uchar code hanzi[]=
{
/* 点阵:24x24
提取点阵方向:纵向
字节掉转:是
字节方式:C语言 */
0x00,0x40,0x82,0x04,0x0C,0x38,0x10,0xC0, // 清
0x08,0x48,0x48,0x48,0x48,0x48,0xFF,0xFE,
0x4A,0x48,0x68,0x6C,0x4C,0x08,0x00,0x00,
0x00,0x80,0x81,0x87,0xC2,0xF8,0x07,0x00,
0x02,0x02,0xFA,0xF2,0x92,0x92,0x93,0x93,
0x92,0x92,0xFA,0xFA,0x13,0x03,0x02,0x00,
0x00,0x00,0x00,0x00,0x3F,0x7F,0x00,0x00,
0x00,0x00,0xFF,0x7F,0x04,0x04,0x04,0x24,
0x24,0xE4,0x7F,0x3F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x04,0x0C,0x38,0x70,0x00, // 达
0x80,0x80,0x80,0x80,0x80,0xFF,0xFE,0x82,
0x80,0x80,0xC0,0xE0,0xC0,0x80,0x00,0x00,
0x00,0x08,0x08,0x08,0x08,0xFC,0xFC,0x08,
0x00,0x00,0x00,0x80,0xE0,0x7F,0x1F,0x10,
0x20,0x60,0xC0,0xC0,0x80,0x00,0x00,0x00,
0x00,0x10,0x70,0x30,0x18,0x0F,0x1F,0x20,
0x64,0x62,0x63,0x61,0x60,0x60,0x60,0x60,
0x60,0x60,0x60,0x61,0x63,0x23,0x20,0x00,
0x00,0x00,0x00,0x00,0x04,0x18,0x70,0xE0, // 光
0xC0,0x00,0x00,0xFF,0xFE,0x02,0x00,0x80,
0xE0,0x7C,0x18,0x08,0x00,0x00,0x00,0x00,
0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x05,
0xFC,0xFC,0x04,0x07,0x07,0xFC,0xFE,0x05,
0x04,0x04,0x04,0x04,0x06,0x86,0x04,0x00,
0x00,0x40,0x40,0x20,0x20,0x10,0x18,0x0E,
0x07,0x01,0x00,0x00,0x00,0x3F,0x7F,0x60,
0x60,0x60,0x60,0x60,0x60,0x7F,0x30,0x00,
0x00,0x00,0x00,0xF0,0xE0,0x20,0x20,0x20, // 电
0x20,0x20,0xFF,0xFE,0x22,0x20,0x20,0x20,
0x20,0xF0,0xF0,0x20,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xFF,0xFF,0x84,0x84,0x84,
0x84,0x84,0xFF,0xFF,0x84,0x84,0x84,0x84,
0x84,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0x01,0x00,0x00,0x00,
0x00,0x00,0x3F,0x7F,0x60,0x60,0x60,0x60,
0x60,0x61,0x60,0x60,0x60,0x7E,0x30,0x00,
0x00,0x40,0x40,0x40,0x40,0xFF,0xFE,0x42, // 技
0x60,0x40,0x20,0x20,0x20,0x20,0xFF,0xFE,
0x22,0x20,0x20,0x30,0x38,0x30,0x20,0x00,
0x00,0x20,0x60,0x30,0x10,0xFF,0xFF,0x04,
0x02,0x00,0x04,0x3C,0xC4,0x04,0x07,0x07,
0x04,0xE4,0xFC,0x1E,0x04,0x00,0x00,0x00,
0x00,0x20,0x20,0x20,0x60,0xFF,0x7F,0x00,
0x00,0x80,0x40,0x20,0x30,0x1B,0x0E,0x06,
0x0F,0x19,0x30,0x70,0x70,0x20,0x20,0x00,
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80, // 术
0x80,0x80,0x80,0xFF,0xFE,0x82,0x80,0x80,
0x84,0x9C,0xB8,0x90,0xC0,0xC0,0x80,0x00,
0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x70,
0x3C,0x0F,0x03,0xFF,0xFF,0x00,0x0F,0x38,
0xE0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x08,0x04,0x06,0x03,0x01,0x00,0x00,
0x00,0x00,0x00,0xFF,0x7F,0x00,0x00,0x00,
0x00,0x01,0x03,0x06,0x0E,0x04,0x04,0x00,
0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10, // 有
0x90,0xF0,0x78,0x1F,0x16,0x12,0x10,0x10,
0x10,0x90,0x90,0x18,0x1C,0x18,0x10,0x00,
0x00,0x40,0x40,0x20,0x10,0x18,0x0C,0xFF,
0xFF,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
0x11,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,
0x7F,0x01,0x01,0x01,0x01,0x21,0x21,0x61,
0xE1,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0xFE,0xFC,0x04,0x04,0xE4, // 限
0x3E,0x0E,0x04,0xFE,0xFC,0x44,0x44,0x44,
0x44,0x44,0x44,0xFE,0xFE,0x04,0x00,0x00,
0x00,0x00,0x00,0xFF,0xFF,0x80,0x83,0x84,
0xF8,0xF0,0x00,0xFF,0xFF,0x08,0x08,0x78,
0x88,0x08,0x88,0x5F,0x6F,0x30,0x20,0x00,
0x00,0x00,0x00,0xFF,0x7F,0x00,0x00,0x03,
0x01,0x00,0x40,0xFF,0x7F,0x30,0x10,0x08,
0x01,0x07,0x0C,0x18,0x30,0x70,0x20,0x20,
0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x78, // 公
0x1E,0x0C,0x04,0x00,0x00,0x07,0x1A,0x60,
0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x20,0x10,0x0C,0x06,0x03,0x00,0x00,
0xC0,0xF0,0x3E,0x0C,0x04,0x00,0x80,0x00,
0x00,0x01,0x07,0x0E,0x1C,0x0C,0x08,0x00,
0x00,0x00,0x00,0x10,0x30,0x38,0x36,0x13,
0x11,0x10,0x10,0x10,0x10,0x10,0x10,0x11,
0x16,0x1C,0x78,0x30,0x00,0x00,0x00,0x00,
0x00,0x00,0x40,0x44,0x44,0x44,0x44,0x44, // 司
0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x64,
0x64,0x44,0x04,0xFE,0xFE,0x04,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xFC,0xF8,0x08,
0x08,0x08,0x08,0x08,0x08,0xFC,0xFC,0x08,
0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x0F,0x07,0x02,
0x02,0x02,0x02,0x02,0x02,0x0F,0x07,0x20,
0x20,0x60,0xE0,0x7F,0x3F,0x00,0x00,0x00,
};
uchar code ascii[]=
{
/*-- 文字: 0 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x80,0xC0,0x60,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0xFE,0xFF,0x01,
0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x00,0x01,0x07,0x0E,0x18,0x10,0x10,0x18,
0x0E,0x07,0x01,0x00,
/*-- 文字: 1 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x80,0x80,0x80,0xC0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,
0x10,0x10,0x00,0x00,
/*-- 文字: 2 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x80,0x40,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0x03,0x03,0x00,
0x80,0x40,0x20,0x38,0x1F,0x07,0x00,0x00,0x00,0x1C,0x1A,0x19,0x18,0x18,0x18,0x18,
0x18,0x1F,0x00,0x00,
/*-- 文字: 3 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x80,0xC0,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0x00,0x03,0x03,0x00,
0x10,0x10,0x18,0x2F,0xE7,0x80,0x00,0x00,0x00,0x07,0x0F,0x10,0x10,0x10,0x10,0x18,
0x0F,0x07,0x00,0x00,
/*-- 文字: 4 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xE0,0xF0,0x00,0x00,0x00,0x00,0xC0,0xB0,0x88,
0x86,0x81,0x80,0xFF,0xFF,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x1F,
0x1F,0x10,0x10,0x00,
/*-- 文字: 5 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0xE0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x3F,0x10,
0x08,0x08,0x08,0x18,0xF0,0xE0,0x00,0x00,0x00,0x07,0x0B,0x10,0x10,0x10,0x10,0x1C,
0x0F,0x03,0x00,0x00,
/*-- 文字: 6 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x80,0xC0,0x40,0x20,0x20,0x20,0xE0,0xC0,0x00,0x00,0x00,0xFC,0xFF,0x21,
0x10,0x08,0x08,0x08,0x18,0xF0,0xE0,0x00,0x00,0x01,0x07,0x0C,0x18,0x10,0x10,0x10,
0x08,0x0F,0x03,0x00,
/*-- 文字: 7 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0xC0,0xE0,0x60,0x60,0x60,0x60,0x60,0xE0,0x60,0x00,0x00,0x00,0x03,0x00,
0x00,0x00,0xE0,0x18,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x1F,0x00,
0x00,0x00,0x00,0x00,
/*-- 文字: 8 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x80,0xC0,0x60,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x87,0xEF,0x2C,
0x18,0x18,0x30,0x30,0x68,0xCF,0x83,0x00,0x00,0x07,0x0F,0x08,0x10,0x10,0x10,0x10,
0x18,0x0F,0x07,0x00,
/*-- 文字: 9 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0xC0,0xC0,0x20,0x20,0x20,0x20,0xC0,0x80,0x00,0x00,0x00,0x1F,0x3F,0x60,
0x40,0x40,0x40,0x20,0x10,0xFF,0xFE,0x00,0x00,0x00,0x0C,0x1C,0x10,0x10,0x10,0x08,
0x0F,0x03,0x00,0x00,
/*-- 文字: A --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x80,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7C,
0x43,0x40,0x47,0x7F,0xF8,0x80,0x00,0x00,0x10,0x18,0x1F,0x10,0x00,0x00,0x00,0x00,
0x13,0x1F,0x1C,0x10,
/*-- 文字: B --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0xFF,0xFF,0x10,
0x10,0x10,0x10,0x18,0x2F,0xE7,0x80,0x00,0x10,0x1F,0x1F,0x10,0x10,0x10,0x10,0x10,
0x18,0x0F,0x07,0x00,
/*-- 文字: C --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x80,0xC0,0x40,0x20,0x20,0x20,0x20,0x60,0xE0,0x00,0x00,0xFC,0xFF,0x01,
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x01,0x07,0x0E,0x18,0x10,0x10,0x10,
0x08,0x04,0x03,0x00,
/*-- 文字: D --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x40,0xC0,0x80,0x00,0x00,0x00,0xFF,0xFF,0x00,
0x00,0x00,0x00,0x00,0x01,0xFF,0xFE,0x00,0x10,0x1F,0x1F,0x10,0x10,0x10,0x18,0x08,
0x0E,0x07,0x01,0x00,
/*-- 文字: E --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x20,0x20,0x60,0x80,0x00,0x00,0xFF,0xFF,0x10,
0x10,0x10,0x10,0x7C,0x00,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x10,0x10,0x10,0x10,
0x10,0x18,0x06,0x00,
/*-- 文字: F --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x20,0xE0,0xE0,0x20,0x20,0x20,0x20,0x20,0x60,0x60,0x80,0x00,0x00,0xFF,0xFF,0x10,
0x10,0x10,0x10,0x7C,0x00,0x00,0x01,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
/*-- 文字: . --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,
/*-- 文字: : --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,
0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x1C,0x1C,0x00,0x00,
0x00,0x00,0x00,0x00,
};
uchar code zimu[]=
{
/*-- 文字: c --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0x18,
0x04,0x04,0x04,0x3C,0x38,0x00,0x00,0x00,0x00,0x03,0x0F,0x0C,0x10,0x10,0x10,0x10,
0x08,0x06,0x00,0x00,
/*-- 文字: o --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF0,0x18,
0x0C,0x04,0x04,0x0C,0x18,0xF0,0xE0,0x00,0x00,0x03,0x0F,0x0C,0x10,0x10,0x10,0x10,
0x0C,0x0F,0x03,0x00,
/*-- 文字: n --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFC,
0x08,0x08,0x04,0x04,0xFC,0xF8,0x00,0x00,0x00,0x10,0x1F,0x1F,0x10,0x00,0x00,0x10,
0x1F,0x1F,0x10,0x00,
/*-- 文字: t --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,
0xFF,0xFF,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x1F,0x10,0x10,
0x10,0x0C,0x00,0x00,
/*-- 文字: r --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0xFC,
0xFC,0x10,0x08,0x04,0x04,0x0C,0x0C,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,
0x00,0x00,0x00,0x00,
/*-- 文字: o --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF0,0x18,
0x0C,0x04,0x04,0x0C,0x18,0xF0,0xE0,0x00,0x00,0x03,0x0F,0x0C,0x10,0x10,0x10,0x10,
0x0C,0x0F,0x03,0x00,
/*-- 文字: l --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x20,0x20,0x20,0xE0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,
0x10,0x10,0x00,0x00,
/*-- 文字: l --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x20,0x20,0x20,0xE0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,
0x10,0x10,0x00,0x00,
/*-- 文字: e --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,
0x48,0x44,0x44,0x44,0x4C,0x78,0x70,0x00,0x00,0x00,0x03,0x0F,0x0C,0x18,0x10,0x10,
0x10,0x08,0x04,0x00,
/*-- 文字: r --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,0xFC,
0xFC,0x10,0x08,0x04,0x04,0x0C,0x0C,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,0x10,0x10,
0x00,0x00,0x00,0x00,
/*-- 文字: : --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0E,0x0E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,
0x00,0x00,0x00,0x00,
/*-- 文字: u --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFE,
0x00,0x00,0x00,0x04,0xFC,0xFE,0x00,0x00,0x00,0x00,0x0F,0x1F,0x18,0x10,0x10,0x08,
0x1F,0x0F,0x08,0x00,
/*-- 文字: c --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xF8,0x18,
0x04,0x04,0x04,0x3C,0x38,0x00,0x00,0x00,0x00,0x03,0x0F,0x0C,0x10,0x10,0x10,0x10,
0x08,0x06,0x00,0x00,
/*-- 文字: 1 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x80,0x80,0x80,0xC0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x1F,0x1F,0x10,
0x10,0x10,0x00,0x00,
/*-- 文字: 6 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x80,0xC0,0x40,0x20,0x20,0x20,0xE0,0xC0,0x00,0x00,0x00,0xFC,0xFF,0x21,
0x10,0x08,0x08,0x08,0x18,0xF0,0xE0,0x00,0x00,0x01,0x07,0x0C,0x18,0x10,0x10,0x10,
0x08,0x0F,0x03,0x00,
/*-- 文字: 9 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0xC0,0xC0,0x20,0x20,0x20,0x20,0xC0,0x80,0x00,0x00,0x00,0x1F,0x3F,0x60,
0x40,0x40,0x40,0x20,0x10,0xFF,0xFE,0x00,0x00,0x00,0x0C,0x1C,0x10,0x10,0x10,0x08,
0x0F,0x03,0x00,0x00,
/*-- 文字: 8 --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x80,0xC0,0x60,0x20,0x20,0x20,0x20,0x60,0xC0,0x80,0x00,0x00,0x87,0xEF,0x2C,
0x18,0x18,0x30,0x30,0x68,0xCF,0x83,0x00,0x00,0x07,0x0F,0x08,0x10,0x10,0x10,0x10,
0x18,0x0F,0x07,0x00,
/*-- 文字: u --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFE,
0x00,0x00,0x00,0x04,0xFC,0xFE,0x00,0x00,0x00,0x00,0x0F,0x1F,0x18,0x10,0x10,0x08,
0x1F,0x0F,0x08,0x00,
/*-- 文字: s --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x78,
0xCC,0xC4,0x84,0x84,0x84,0x0C,0x1C,0x00,0x00,0x00,0x1E,0x18,0x10,0x10,0x10,0x11,
0x19,0x0F,0x06,0x00,
/*-- 文字: t --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,
0xFF,0xFF,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x1F,0x10,0x10,
0x10,0x0C,0x00,0x00,
/*-- 文字: a --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x98,0xD8,
0x44,0x64,0x24,0x24,0xFC,0xF8,0x00,0x00,0x00,0x0F,0x1F,0x18,0x10,0x10,0x10,0x08,
0x1F,0x1F,0x10,0x18,
/*-- 文字: t --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x04,0x04,
0xFF,0xFF,0x04,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x1F,0x10,0x10,
0x10,0x0C,0x00,0x00,
/*-- 文字: u --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xFC,0xFE,
0x00,0x00,0x00,0x04,0xFC,0xFE,0x00,0x00,0x00,0x00,0x0F,0x1F,0x18,0x10,0x10,0x08,
0x1F,0x0F,0x08,0x00,
/*-- 文字: s --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x78,
0xCC,0xC4,0x84,0x84,0x84,0x0C,0x1C,0x00,0x00,0x00,0x1E,0x18,0x10,0x10,0x10,0x11,
0x19,0x0F,0x06,0x00,
/*-- 文字: : --*/
/*-- 宋体18; 此字体下对应的点阵为:宽x高=12x24 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0E,0x0E,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,
0x00,0x00,0x00,0x00,
};
void delay_us(uint us)
{
while(us--);
}
void delay_ms(uint ms)
{
uchar i;
while(ms--)
for(i=0;i<120;i++);
}
void write(bit flag,uchar dat)
{
cs=0;
cd=flag; //flag=0,write command;flag=1,write data
wr=0;
rd=1;
dport=dat;
wr=1;
}
void init(void)//*
{
cs=0;
/*reset*/
rst=0;
delay_ms(2); //power on reset
rst=1;
delay_ms(200);
write(0,0xe2); //reset by command
delay_ms(2);
/*power control*/
write(0,0xe9); //Bias Ratio:1/10 bias
write(0,0x2b); //power control set as internal power
write(0,0x25); //set temperate compensation as 0.05%
write(0,0x81); //electronic potentionmeter
write(0,0xbf);
/*display control*/
write(0,0xa4); //all pixel off
write(0,0xa6); //inverse display off
/*lcd control*/
write(0,0xc0); //19:partial display and MX disable,MY enable
write(0,0xa3); //line rate 15.2klps
write(0,0xd1); //rgb-rgb
write(0,0xd5); //4k color mode
write(0,0x84); //12:partial display control disable
/*n-line inversion*/
write(0,0xc8);
write(0,0x10); //enable NIV
/*com scan fuction*/
write(0,0xda); //enable FRC,PWM,LRM sequence
/*window*/
write(0,0xf4); //wpc0:column
write(0,0x25); //start from 130
write(0,0xf6); //wpc1
write(0,0x5A); //end:272
write(0,0xf5); //wpp0:row
write(0,0x00); //start from 0
write(0,0xf7); //wpp1
write(0,0x9F); //end 160
write(0,0xf8); //inside mode
write(0,0x89); //RAM control
write(0,0xad); //display on,select on/off Enhance mode disable
/*scroll line*/
write(0,0x40); //low bit of scroll line
write(0,0x50); //high bit of scroll line
write(0,0xc4); //19,enable FLT and FLB
write(0,0x90); //14:FLT,FLB set
write(0,0x00);
/*partial display*/
write(0,0x84); //12,set partial display control:off
write(0,0xf1); //com end
write(0,0x9f); //160
write(0,0xf2); //display start
write(0,0); //0
write(0,0xf3); //display end
write(0,159); //160
}
void words(uchar x,uchar y,uchar type,uchar *p) //type=1,ascii;type=2,Chinese character
{
uchar i,k,j,m,n,l,x0,dat0,dat1,dat2,dat3,dat4,dat5,dat6;
x=37+x;//地址从25H开始的,每个地址对应3个像素点【3个像素点对应RGB】X=0~54
x0=0x00|(x&0x0f);
x=0x10|((x&0xf0)>>4);
for(i=0;i<3;i++)//纵向 3个字节 3*8=24行
{
n=i*12*type;
for(j=0;j<8;j++)//纵向 每个字节8个点
{
m=i*8+j;
write(0,0x89);//SET RAM ADDRESS CONTROL
write(0,x0);//Set Column Address LSB CA[3:0]
write(0,x);//Set Column Address MSB CA[7:4]
write(0,0x60|((y+m)&0x0f));//Set Row Address LSB RA [3:0]
write(0,0x70|(((y+m)&0xf0)>>4));//Set Row Address MSB RA [7:4]
for(k=0;k<2*type;k++)//数据转换 每次转换完成6个点的转换,转换后6个点变成 2个12点,3个字节,字符是2次循环【12点】
{
l=k*6+n;
dat6=0x01<<j;
dat0=(*(p+l))&dat6;
dat0=dat0>>j;
dat0<<=7;
dat1=(*(p+l+1))&dat6;
dat1=dat1>>j;
dat1<<=3;
dat2=*(p+2+l)&dat6;
dat2=dat2>>j;
dat2<<=7;
dat3=(*(p+3+l))&dat6;
dat3=dat3>>j;
dat3<<=3;
dat4=(*(p+4+l))&dat6;
dat4=dat4>>j;
dat4<<=7;
dat5=(*(p+5+l))&dat6;
dat5=dat5>>j;
dat5<<=3;
write(1,dat0|dat1);
write(1,dat2|dat3);
write(1,dat4|dat5);
}
write(0,0x88);//SET RAM ADDRESS CONTROL,停止自加
}
}
write(0,0x89);//SET RAM ADDRESS CONTROL
}
void picture(uchar *p) //120*120图形显示程序
{
uchar i,k;
for(i=0;i<120;i++)
{
write(0,0x60|(i&0x0f));//Set Row Address LSB RA [3:0]
write(0,0x70|((i&0xf0)>>4));//Set Row Address MSB RA [7:4]
write(0,0x05); //culomn address LSB//25H开始
write(0,0x12); //culomn address MSB
for(k=0;k<60;k++)//120个点,每个点占4位
{
write(1,*p++);//写数据
}
}
}
void lcdscan(uchar dat1,uchar dat2)//奇数行时写入dat2 偶数行写入dat1
{
uchar i,j;
write(0,0x60); //row address LSB
write(0,0x70); //row address MSB
write(0,0x05); //culomn address LSB
write(0,0x12); //culomn address MSB
for(j=0;j<160;j++)
{
for(i=0;i<27;i++)
{
if(j%2==0)
{
write(1,dat1);
write(1,dat1);
write(1,dat1);
}
else
{
write(1,dat2);
write(1,dat2);
write(1,dat2);
}
}
}
}
void character(void)
{
uchar *q;
uchar i,j,temp[3],table[6];
lcdscan(0x00,0x00);
for(i=0;i<4;i++)//清达光电
{
q=hanzi+i*72;
j=9*i+4; // j=8*i+4;// 每个汉字是24*24点的,计算其地址,24个点占用地址为8个
words(j,10,2,q);
}
for(i=0;i<11;i++)//controller:
{
q=zimu+i*36;
j=4*i+4;
words(j,40,1,q);
}
for(i=11;i<18;i++)//uc1698u
{
q=zimu+i*36;
j=4*(i-11)+4;
words(j,70,1,q);
}
for(i=18;i<25;i++)//status:
{
q=zimu+i*36;
j=4*(i-18)+1;
words(j,100,1,q);
}
}
void main(void)
{
uchar *p;
uchar i,j,k;
init();
//write(0,0x84); //12,set partial display off
//lcdscan(0xf0,0x0f); //雪花
//delay_ms(500);
//write(0xff,0xff); //all pixel on
//delay_ms(500);
//lcdscan(0xff,0x00); //横线
//delay_ms(500);
lcdscan(0x00,0x00);
character();
delay_ms(500);
while(1);
//lcdscan(0x00,0x00);
//goto loop;
// }
}

免责声明:以上信息由会员自行提供,内容的真实性、准确性和合法性由发布会员负责。一步电子网(www.kuyibu.com)对此不承担任何责任。
友情提醒:为规避购买风险,建议您在购买相关产品时,优先选择一步电子网(www.kuyibu.com)VIP会员

杭州清达光电技术有限公司 电话:86-0571-89902095 传真:86-0571-89902095
地址:浙江 - 杭州 杭州市余杭区良渚街道博园路1号杭州电子市场西区2楼2A001(门市部)
技术支持:一步电子网  管理商铺入口

声明:以上所展示的信息由企业自行提供,内容的真实性、准确性和合法性由发布企业负责。一步电子网对此不承担任何保证责任。

金瓶儿 <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <蜘蛛词>| <文本链> <文本链> <文本链> <文本链> <文本链> <文本链>