很多工程师就如何写ST7565R驱动的液晶屏驱动程序而头痛,下面就以CYW-G12864-309为例,告诉你如何写驱动.
一、先要了解其特点和内部电路:
1液晶屏(LCD)
在 LCD上排列着128×64 点阵,128个列信号与驱动 IC相连,64个行信号也与驱动 IC相连,IC邦定在 lcd玻璃上(这种加工工艺叫COG及cog液晶屏).
2内部电路框图:
3、例程;
以下为并行方式的范例程序:
// 液晶模块型号:CYW-G12864-309,不带字库
// 接口方式:并行接口,6800 时序
// 驱动IC 是:ST7565R
// 本程序所带的8x16 点阵及5x8 点阵的ASCII 码字符的数据都是从CYW-G12864-309型号字库IC里读出来的国标的。
// 单片机:ST12C5A60S2(51 系列单片机),晶振:12MHz
// 版权所有:深圳驰宇微科技有限公司
// 网址:http://www.cywlcd.com;
// 编程:XXX 2012 年5 月8日
#include
sbit lcd_cs1 =P3^4; //接口定义,CS:片选
sbit lcd_reset =P3^5; //接口定义,RESET:复位
sbit lcd_rs =P3^3; //接口定义,RS:命令/数据寄存器选择。也叫"A0",或“CD”
sbit lcd_e =P3^0; //接口定义,E:读写使能信号
sbit lcd_rw =P2^1; //接口定义,R/W:读/写
sbit key =P2^0; //按键接口,P2.0 口与GND 之间接一个按
//另外P1.0~1.7 对应DB0~DB7
#define uchar unsigned char
#define uint unsigned int
#define ulong unsigned long
uchar code ascii_table_8x16[95][16];
uchar code ascii_table_5x8[95][5];
uchar code cheng1[];
uchar code gong1[];
uchar code zhuang1[];
uchar code tai1[];
uchar code shi1[];
uchar code yong1[];
uchar code bmp_12864_1[];
uchar code bmp_12864_2[];
uchar code bmp_12864_3[];
uchar code bmp_12864_4[];
uchar code bmp_12864_5[];
//延时
void delay(int i)
{
int j,k;
for(j=0;j<i;j++)
for(k=0;k<110;k++);
}
//短延时
void delay_us(int i)
{
int j,k;
for(j=0;j<i;j++)
for(k=0;k<1;k++);
}
//等待按键:当有按键按下时,单片机会检测到一个低电平
void waitkey()
{
repeat: if(key==1) goto repeat;
else delay(2000);
}
//传一个字节的命令到液晶屏驱动IC
void transfer_command(int data1)
{
lcd_cs1=0; //片选=0,选中此IC
lcd_rs=0; //RS=0:表示以下传输的一个字节是命令
lcd_e=0; //E:读写使能
lcd_rw=0; //RW=0:写
P1=data1;
lcd_e=1;
delay_us(2);
lcd_cs1=1; //传完数据后片选=1,防止意外选中此IC,对抗干扰有好处
lcd_e=0;
}
//传一个字节的数据到液晶显示屏驱动IC
void transfer_data(int data1)
{
lcd_cs1=0; //片选=0,选中此IC
lcd_rs=1; //RS=1:表示以下传输的一个字节是要显示的点阵数据
lcd_e=0; //E:读写使能
lcd_rw=0; //RW=0:写
P1=data1;
lcd_e=1;
delay_us(2);
lcd_cs1=1; //传完数据后片选=1,防止意外选中此IC,对抗干扰有好处
lcd_e=0;
}
//LCD 模块初始化
void initial_lcd()
{
lcd_reset=0; //低电平复位
delay(200);
lcd_reset=1; //复位完毕
delay(20);
transfer_command(0xe2); //软复位
delay(50);
transfer_command(0x2c); //升压步聚1:打开升压
delay(50);
transfer_command(0x2e); //升压步聚2:打开升压及电压调整器
delay(50);
transfer_command(0x2f); //升压步聚3:打开升压、电压调整器、电压跟随器
delay(50);
transfer_command(0x24); //粗调对比度,可设置范围0x20~0x27
transfer_command(0x81); //微调对比度
transfer_command(0x1A); //0x1A,微调对比度的值,可设置范围0x00~0x3f
transfer_command(0xa2); //1/9 偏压比(bias)
transfer_command(0xc8); //行扫描顺序:从上到下
transfer_command(0xa0); //列扫描顺序:从左到右
transfer_command(0x60); //扫描起始行:0X40 表示从第1 行开始,0x41:第2 行...0x60:第33 行,由于LCD 的走线设计,本LCD 特殊地从33 行开
始扫描。
transfer_command(0xaf); //打开显示
}
//LCD 地址设置,括号内的参数分别为(页,列)
void lcd_address(uchar page,uchar column)
{
column=column;
page=page-1; //我们平常说的第1页,其实对IC来说是第0页,所以在这里减去1
transfer_command(0xb0+page); //设置页地址。每页是8 行。一个画面的64 行被分成8 个页。
transfer_command(((column>>4)&0x0f)+0x10); //设置列地址的高4 位
transfer_command(column&0x0f); //设置列地址的低4 位
}
//全屏清屏
void clear_screen()
{
unsigned char i,j;
for(i=0;i<9;i++) //液晶屏驱动IC 有65 行(分为9 个页),只引出来64 行(8 页),有1 行没引出来,清屏时一并清掉。
{
lcd_address(1+i,1);
for(j=0;j<132;j++) //液晶驱动IC 有132 列,只引出来128 列,有4 列没引出来,所以清屏时一并清掉。
{
transfer_data(0x00);//全部显示数据是0,以此清屏。
}
}
}
//===显示测试画面:例如全显示,隔行显示,隔列显示,雪花显示=====
void test_display(uchar data1,uchar data2)
{
int i,j;
for(j=0;j<8;j++)
{
lcd_address(j+1,0);
for(i=0;i<128;i++)
{
transfer_data(data1);
transfer_data(data2);
}
}
}
//显示128x64 点阵图像
void display_graphic_128x64(uchar page,uchar column,uchar *dp)
{
int i,j;
for(j=0;j<8;j++)
{
lcd_address(page+j,column);
for(i=0;i<128;i++)
{
transfer_data(*dp);
dp++;
}
}
}
//显示32x32 点阵图像、汉字、生僻字或32x32 点阵的其他图标
void display_graphic_32x32(uchar page,uchar column,uchar *dp)
{
uchar i,j;
for(j=0;j<4;j++)
{
lcd_address(page+j,column);
for (i=0;i<31;i++)
{
transfer_data(*dp); //写数据到LCD,每写完一个8 位的数据后列地址自动加1
dp++;
}
}
}
//显示16x16 点阵图像、汉字、生僻字或16x16 点阵的其他图标
void display_graphic_16x16(uchar page,uchar column,uchar *dp)
{
uchar i,j;
for(j=0;j<2;j++)
{
lcd_address(page+j,column);
for (i=0;i<16;i++)
{
transfer_data(*dp); //写数据到LCD,每写完一个8 位的数据后列地址自动加1
dp++;
}
}
}
//显示8x16 点阵图像、ASCII, 或8x16 点阵的自造字符、其他图标
void display_graphic_8x16(uchar page,uchar column,uchar *dp)
{
uchar i,j;
for(j=0;j<2;j++)
{
lcd_address(page+j,column);
for (i=0;i<8;i++)
{
transfer_data(*dp); //写数据到LCD,每写完一个8 位的数据后列地址自动加1
dp++;
}
}
}
//显示8x16 点阵ASCII 字符串,括号里的参数是(页,列,数据指针)
void display_string_8x16(uint page,uint column,uchar *text)
{
uint i=0,j,k,n;
while(text[i]>0x00)
{
if((text[i]>=0x20)&&(text[i]<=0x7e))
{
j=text[i]-0x20;
for(n=0;n<2;n++)
{
lcd_address(page+n,column);
for(k=0;k<8;k++)
{
transfer_data(ascii_table_8x16[j][k+8*n]);//传完一个字节数据后,列地址会自动+1
}
}
i++;
column+=8;
}
else
i++;
}
}
//显示5x8 点阵ASCII 字符串,括号里的参数是(页,列,数据指针)
void display_string_5x8(uint page,uint column,uchar *text)
{
uint i=0,j,k;
while(text[i]>0x00)
{
if((text[i]>=0x20)&&(text[i]<0x7e))
{
j=text[i]-0x20;
lcd_address(page,column);
for(k=0;k<5;k++)
{
transfer_data(ascii_table_5x8[j][k]);//传完一个字节数据后,列地址会自动+1
}
transfer_data(0x00);
i++;
column+=6;
}
else
i++;
}
}
void main(void)
{
while(1)
{
initial_lcd(); //LCD 初始化
//显示一些出厂电测常用画面
clear_screen(); //全屏清屏
test_display(0xff,0xff); //全显示
waitkey();
test_display(0x55,0xaa); //雪花1
waitkey();
test_display(0xaa,0x55); //雪花2
waitkey();
//显示一些128x64 点阵的单色图像
clear_screen(); //clear all dots
display_graphic_128x64(1,1,bmp_12864_1); //显示128x64 点阵图片
waitkey();
clear_screen(); //clear all dots
display_graphic_128x64(1,1,bmp_12864_2);
waitkey();
clear_screen(); //全屏清屏
display_graphic_128x64(1,1,bmp_12864_3);
waitkey();
clear_screen(); //全屏清屏
display_graphic_128x64(1,1,bmp_12864_4);
waitkey();
clear_screen(); //全屏清屏
display_graphic_128x64(1,1,bmp_12864_5);
waitkey();
//显示一些不同点阵的汉字或字符
clear_screen(); //全屏清屏
display_graphic_32x32(1,(1+32*1),cheng1); //在第1 页,第49 列显示单个汉字"成"
display_graphic_32x32(1,(1+32*2),gong1); //在第1 页,第49 列显示单个汉字"功"
display_graphic_16x16(6,1,zhuang1); //在第5 页,第1 列显示单个汉字"状"
display_graphic_16x16(6,(1+16),tai1); //在第5 页,第17 列显示单个汉字"态"
display_string_8x16(6,(1+16+16),":"); //在第5 页,第25 列显示单个字符":"
display_graphic_16x16(6,(1+16*2+8),shi1); //在第5 页,第41 列显示单个汉字"使"
display_graphic_16x16(6,(1+16*3+8),yong1); //在第5 页,第49 列显示单个汉字"用"
display_string_8x16(6,89,"12:45"); //在第5 页,第89 列显示单个数字"0"
waitkey();
//显示一些字符串
clear_screen(); //全屏清屏
display_string_8x16(1,1," !\"#$%&'()*+,-./"); //显示8x16 的ASCII 码字符串
//------括号里的参数分别为(页地址,列地址,要显示的字符),
//------注意:为了能显示双引号("),在双引号前面加一个斜杠(\),斜杠(\)本身并不显示出来
display_string_8x16(3,1,"0123456789:;<=>?"); //括号里的参数分别为(页地址,列地址,要显示的字符)
display_string_8x16(5,1,"@ABCDEFGHIJKLMNO");
display_string_8x16(7,1,"PQRSTUVWXYZ[\\]^_"); //注意:为了能显示斜杠(\),在斜杠(\)前面再加一个斜杠(\),两个斜杠(\)只显示一
个出来
waitkey();
//显示一些字符串 //全屏清屏
clear_screen();
display_string_8x16(1,1,"`abcdefghijklmno");
display_string_8x16(3,1,"pqrstuvwxyz{|}~ ");
display_string_5x8(5,1," !\"#$%&'()*+,-./01234");//显示5x8 的ASCII 码字符串
display_string_5x8(6,1,"56789:;<=>?@ABCDEFGHI");
display_string_5x8(7,1,"JKLMNOPQRSTUVWXYZ[\\]^");
display_string_5x8(8,1,"_`abcdefghijklmnopqrs");
waitkey();
}
}
uchar code ascii_table_8x16[95][16]={
//粗体8x16 点阵的ASCII 码的点阵数据,从"CYW-G12864-309"型号的字库IC 中读出来的国标的。
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //- -(即“空格”)ASCII 码:0X20
0x00,0x00,0x38,0xFC, 0xFC,0x38,0x00,0x00, 0x00,0x00,0x00,0x0D, 0x0D,0x00,0x00,0x00, //-!- ASCII 码:0X21
0x00,0x0E,0x1E,0x00, 0x00,0x1E,0x0E,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-"-
0x20,0xF8,0xF8,0x20, 0xF8,0xF8,0x20,0x00, 0x02,0x0F,0x0F,0x02, 0x0F,0x0F,0x02,0x00, //-#-
0x38,0x7C,0x44,0x47, 0x47,0xCC,0x98,0x00, 0x06,0x0C,0x08,0x38, 0x38,0x0F,0x07,0x00, //-$-
0x30,0x30,0x00,0x80, 0xC0,0x60,0x30,0x00, 0x0C,0x06,0x03,0x01, 0x00,0x0C,0x0C,0x00, //-%-
0x80,0xD8,0x7C,0xE4, 0xBC,0xD8,0x40,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-&-
0x00,0x10,0x1E,0x0E, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-'-
0x00,0x00,0xF0,0xF8, 0x0C,0x04,0x00,0x00, 0x00,0x00,0x03,0x07, 0x0C,0x08,0x00,0x00, //-(-
0x00,0x00,0x04,0x0C, 0xF8,0xF0,0x00,0x00, 0x00,0x00,0x08,0x0C, 0x07,0x03,0x00,0x00, //-)-
0x80,0xA0,0xE0,0xC0, 0xC0,0xE0,0xA0,0x80, 0x00,0x02,0x03,0x01, 0x01,0x03,0x02,0x00, //-*- ASCII 码:0X2A
0x00,0x80,0x80,0xE0, 0xE0,0x80,0x80,0x00, 0x00,0x00,0x00,0x03, 0x03,0x00,0x00,0x00, //-+-
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x10,0x1E, 0x0E,0x00,0x00,0x00, //-,-
0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //---
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C, 0x0C,0x00,0x00,0x00, //-.-
0x00,0x00,0x00,0x80, 0xC0,0x60,0x30,0x00, 0x0C,0x06,0x03,0x01, 0x00,0x00,0x00,0x00, //-/-
0xF8,0xF8,0x0C,0xC4, 0x0C,0xF8,0xF0,0x00, 0x03,0x07,0x0C,0x08, 0x0C,0x07,0x03,0x00, //-0- ASCII 码:0X30
0x00,0x10,0x18,0xFC, 0xFC,0x00,0x00,0x00, 0x00,0x08,0x08,0x0F, 0x0F,0x08,0x08,0x00, //-1-
0x08,0x0C,0x84,0xC4, 0x64,0x3C,0x18,0x00, 0x0E,0x0F,0x09,0x08, 0x08,0x0C,0x0C,0x00, //-2-
0x08,0x0C,0x44,0x44, 0x44,0xFC,0xB8,0x00, 0x04,0x0C,0x08,0x08, 0x08,0x0F,0x07,0x00, //-3-
0xC0,0xE0,0xB0,0x98, 0xFC,0xFC,0x80,0x00, 0x00,0x00,0x00,0x08, 0x0F,0x0F,0x08,0x00, //-4- ASCII 码:0X34
0x7C,0x7C,0x44,0x44, 0x44,0xC4,0x84,0x00, 0x04,0x0C,0x08,0x08, 0x08,0x0F,0x07,0x00, //-5-
0xF0,0xF8,0x4C,0x44, 0x44,0xC0,0x80,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-6-
0x0C,0x0C,0x04,0x84, 0xC4,0x7C,0x3C,0x00, 0x00,0x00,0x0F,0x0F, 0x00,0x00,0x00,0x00, //-7-
0xB8,0xFC,0x44,0x44, 0x44,0xFC,0xB8,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-8-
0x38,0x7C,0x44,0x44, 0x44,0xFC,0xF8,0x00, 0x00,0x08,0x08,0x08, 0x0C,0x07,0x03,0x00, //-9-
0x00,0x00,0x00,0x30, 0x30,0x00,0x00,0x00, 0x00,0x00,0x00,0x06, 0x06,0x00,0x00,0x00, //-:-
0x00,0x00,0x00,0x30, 0x30,0x00,0x00,0x00, 0x00,0x00,0x08,0x0E, 0x06,0x00,0x00,0x00, //-;-
0x00,0x80,0xC0,0x60, 0x30,0x18,0x08,0x00, 0x00,0x00,0x01,0x03, 0x06,0x0C,0x08,0x00, //-<-
0x00,0x20,0x20,0x20, 0x20,0x20,0x20,0x00, 0x00,0x01,0x01,0x01, 0x01,0x01,0x01,0x00, //-=-
0x00,0x08,0x18,0x30, 0x60,0xC0,0x80,0x00, 0x00,0x08,0x0C,0x06, 0x03,0x01,0x00,0x00, //->- ASCII 码:0X3E
0x18,0x1C,0x04,0xC4, 0xE4,0x3C,0x18,0x00, 0x00,0x00,0x00,0x0D, 0x0D,0x00,0x00,0x00, //-?-
0xF0,0xF0,0x08,0xC8, 0xC8,0xF8,0xF0,0x00, 0x07,0x0F,0x08,0x0B, 0x0B,0x0B,0x01,0x00, //-@-
0xE0,0xF0,0x98,0x8C, 0x98,0xF0,0xE0,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-A- ASCII 码:0X41
0x04,0xFC,0xFC,0x44, 0x44,0xFC,0xB8,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0F,0x07,0x00, //-B-
0xF0,0xF8,0x0C,0x04, 0x04,0x0C,0x18,0x00, 0x03,0x07,0x0C,0x08, 0x08,0x0C,0x06,0x00, //-C-
0x04,0xFC,0xFC,0x04, 0x0C,0xF8,0xF0,0x00, 0x08,0x0F,0x0F,0x08, 0x0C,0x07,0x03,0x00, //-D-
0x04,0xFC,0xFC,0x44, 0xE4,0x0C,0x1C,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0C,0x0E,0x00, //-E
0x04,0xFC,0xFC,0x44, 0xE4,0x0C,0x1C,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-F-
0xF0,0xF8,0x0C,0x84, 0x84,0x8C,0x98,0x00, 0x03,0x07,0x0C,0x08, 0x08,0x07,0x0F,0x00, //-G-
0xFC,0xFC,0x40,0x40, 0x40,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-H- ASCII 码:0X48
0x00,0x00,0x04,0xFC, 0xFC,0x04,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-I-
0x00,0x00,0x00,0x04, 0xFC,0xFC,0x04,0x00, 0x07,0x0F,0x08,0x08, 0x0F,0x07,0x00,0x00, //-J-
0x04,0xFC,0xFC,0xC0, 0xE0,0x3C,0x1C,0x00, 0x08,0x0F,0x0F,0x00, 0x01,0x0F,0x0E,0x00, //-K-
0x04,0xFC,0xFC,0x04, 0x00,0x00,0x00,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0C,0x0E,0x00, //-L-
0xFC,0xFC,0x38,0x70, 0x38,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-M-
0xFC,0xFC,0x38,0x70, 0xE0,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-N-
0xF8,0xFC,0x04,0x04, 0x04,0xFC,0xF8,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-O-
0x04,0xFC,0xFC,0x44, 0x44,0x7C,0x38,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-P-
0xF8,0xFC,0x04,0x04, 0x04,0xFC,0xF8,0x00, 0x07,0x0F,0x08,0x0E, 0x3C,0x3F,0x27,0x00, //-Q-
0x04,0xFC,0xFC,0x44, 0xC4,0xFC,0x38,0x00, 0x08,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-R-
0x18,0x3C,0x64,0x44, 0xC4,0x9C,0x18,0x00, 0x06,0x0E,0x08,0x08, 0x08,0x0F,0x07,0x00, //-S-
0x00,0x1C,0x0C,0xFC, 0xFC,0x0C,0x1C,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-T-
0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-U-
0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x01,0x03,0x06,0x0C, 0x06,0x03,0x01,0x00, //-V-
0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x07,0x0F,0x0E,0x03, 0x0E,0x0F,0x07,0x00, //-W-
0x0C,0x3C,0xF0,0xE0, 0xF0,0x3C,0x0C,0x00, 0x0C,0x0F,0x03,0x01, 0x03,0x0F,0x0C,0x00, //-X-
0x00,0x0C,0x7C,0xC0, 0xC0,0x7C,0x3C,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-Y-
0x1C,0x0C,0x84,0xC4, 0x64,0x3C,0x1C,0x00, 0x0E,0x0F,0x09,0x08, 0x08,0x0C,0x0E,0x00, //-Z-
0x00,0x00,0xFC,0xFC, 0x04,0x04,0x00,0x00, 0x00,0x00,0x0F,0x0F, 0x08,0x08,0x00,0x00, //-[-
0x38,0x70,0xE0,0xC0, 0x80,0x00,0x00,0x00, 0x00,0x00,0x00,0x01, 0x03,0x07,0x0E,0x00, //-\-
0x00,0x00,0x04,0x04, 0xFC,0xFC,0x00,0x00, 0x00,0x00,0x08,0x08, 0x0F,0x0F,0x00,0x00, //-]-
0x08,0x0C,0x06,0x03, 0x06,0x0C,0x08,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-^-
0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x20,0x20,0x20,0x20, 0x20,0x20,0x20,0x20, //-_-
0x00,0x00,0x03,0x07, 0x04,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-`-
0x00,0xA0,0xA0,0xA0, 0xE0,0xC0,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-a- ASCII 码:0X61
0x04,0xFC,0xFC,0x20, 0x60,0xC0,0x80,0x00, 0x00,0x0F,0x0F,0x08, 0x08,0x0F,0x07,0x00, //-b-
0xC0,0xE0,0x20,0x20, 0x20,0x60,0x40,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0C,0x04,0x00, //-c-
0x80,0xC0,0x60,0x24, 0xFC,0xFC,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-d-
0xC0,0xE0,0xA0,0xA0, 0xA0,0xE0,0xC0,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0C,0x04,0x00, //-e-
0x40,0xF8,0xFC,0x44, 0x0C,0x18,0x00,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-f-
0xC0,0xE0,0x20,0x20, 0xC0,0xE0,0x20,0x00, 0x27,0x6F,0x48,0x48, 0x7F,0x3F,0x00,0x00, //-g-
0x04,0xFC,0xFC,0x40, 0x20,0xE0,0xC0,0x00, 0x08,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-h-
0x00,0x00,0x20,0xEC, 0xEC,0x00,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-i-
0x00,0x00,0x00,0x00, 0x20,0xEC,0xEC,0x00, 0x00,0x30,0x70,0x40, 0x40,0x7F,0x3F,0x00, //-j-
0x04,0xFC,0xFC,0x80, 0xC0,0x60,0x20,0x00, 0x08,0x0F,0x0F,0x01, 0x03,0x0E,0x0C,0x00, //-k-
0x00,0x00,0x04,0xFC, 0xFC,0x00,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-l-
0xE0,0xE0,0x60,0xC0, 0x60,0xE0,0xC0,0x00, 0x0F,0x0F,0x00,0x07, 0x00,0x0F,0x0F,0x00, //-m-
0x20,0xE0,0xC0,0x20, 0x20,0xE0,0xC0,0x00, 0x00,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-n-
0xC0,0xE0,0x20,0x20, 0x20,0xE0,0xC0,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-o-
0x20,0xE0,0xC0,0x20, 0x20,0xE0,0xC0,0x00, 0x40,0x7F,0x7F,0x48, 0x08,0x0F,0x07,0x00, //-p-
0xC0,0xE0,0x20,0x20, 0xC0,0xE0,0x20,0x00, 0x07,0x0F,0x08,0x48, 0x7F,0x7F,0x40,0x00, //-q-
0x20,0xE0,0xC0,0x60, 0x20,0xE0,0xC0,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-r-
0x40,0xE0,0xA0,0x20, 0x20,0x60,0x40,0x00, 0x04,0x0C,0x09,0x09, 0x0B,0x0E,0x04,0x00, //-s-
0x20,0x20,0xF8,0xFC, 0x20,0x20,0x00,0x00, 0x00,0x00,0x07,0x0F, 0x08,0x0C,0x04,0x00, //-t-
0xE0,0xE0,0x00,0x00, 0xE0,0xE0,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-u-
0x00,0xE0,0xE0,0x00, 0x00,0xE0,0xE0,0x00, 0x00,0x03,0x07,0x0C, 0x0C,0x07,0x03,0x00, //-v-
0xE0,0xE0,0x00,0x80, 0x00,0xE0,0xE0,0x00, 0x07,0x0F,0x0C,0x07, 0x0C,0x0F,0x07,0x00, //-w-
0x20,0x60,0xC0,0x80, 0xC0,0x60,0x20,0x00, 0x08,0x0C,0x07,0x03, 0x07,0x0C,0x08,0x00, //-x-
0xE0,0xE0,0x00,0x00, 0x00,0xE0,0xE0,0x00, 0x47,0x4F,0x48,0x48, 0x68,0x3F,0x1F,0x00, //-y-
0x60,0x60,0x20,0xA0, 0xE0,0x60,0x20,0x00, 0x0C,0x0E,0x0B,0x09, 0x08,0x0C,0x0C,0x00, //-z- //
0x00,0x40,0x40,0xF8, 0xBC,0x04,0x04,0x00, 0x00,0x00,0x00,0x07, 0x0F,0x08,0x08,0x00, //-{-
0x00,0x00,0x00,0xBC, 0xBC,0x00,0x00,0x00, 0x00,0x00,0x00,0x0F, 0x0F,0x00,0x00,0x00, //-|-
0x00,0x04,0x04,0xBC, 0xF8,0x40,0x40,0x00, 0x00,0x08,0x08,0x0F, 0x07,0x00,0x00,0x00, //-}-
0x08,0x0C,0x04,0x0C, 0x08,0x0C,0x04,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-~- ASCII 码:0X7E
};
uchar code ascii_table_5x8[95][5]={
//5x8 点阵的ASCII 码的点阵数据,从"CYW-G12864-309"型号的字库IC 中读出来的国标的。
0x00,0x00,0x00,0x00,0x00,//- - //空格
0x00,0x00,0x4f,0x00,0x00,//-!-
0x00,0x07,0x00,0x07,0x00,//-"-
0x14,0x7f,0x14,0x7f,0x14,//-#-
0x24,0x2a,0x7f,0x2a,0x12,//-$-
0x23,0x13,0x08,0x64,0x62,//-%-
0x36,0x49,0x55,0x22,0x50,//-&-
0x00,0x05,0x07,0x00,0x00,//-'-
0x00,0x1c,0x22,0x41,0x00,//-(-
0x00,0x41,0x22,0x1c,0x00,//-)-
0x14,0x08,0x3e,0x08,0x14,//-*-
0x08,0x08,0x3e,0x08,0x08,//-+-
0x00,0x50,0x30,0x00,0x00,//-,-
0x08,0x08,0x08,0x08,0x08,//---
0x00,0x60,0x60,0x00,0x00,//-.-
0x20,0x10,0x08,0x04,0x02,//-/-
0x3e,0x51,0x49,0x45,0x3e,//-0-
0x00,0x42,0x7f,0x40,0x00,//-1-
0x42,0x61,0x51,0x49,0x46,//-2-
0x21,0x41,0x45,0x4b,0x31,//-3-
0x18,0x14,0x12,0x7f,0x10,//-4-
0x27,0x45,0x45,0x45,0x39,//-5-
0x3c,0x4a,0x49,0x49,0x30,//-6-
0x01,0x71,0x09,0x05,0x03,//-7-
0x36,0x49,0x49,0x49,0x36,//-8-
0x06,0x49,0x49,0x29,0x1e,//-9-
0x00,0x36,0x36,0x00,0x00,//-:-
0x00,0x56,0x36,0x00,0x00,//-;-
0x08,0x14,0x22,0x41,0x00,//-<-
0x14,0x14,0x14,0x14,0x14,//-=-
0x00,0x41,0x22,0x14,0x08,//->-
0x02,0x01,0x51,0x09,0x06,//-?-
0x32,0x49,0x79,0x41,0x3e,//-@-
0x7e,0x11,0x11,0x11,0x7e,//-A-
0x7f,0x49,0x49,0x49,0x36,//-B-
0x3e,0x41,0x41,0x41,0x22,//-C-
0x7f,0x41,0x41,0x22,0x1c,//-D-
0x7f,0x49,0x49,0x49,0x41,//-E-
0x7f,0x09,0x09,0x09,0x01,//-F-
0x3e,0x41,0x49,0x49,0x7a,//-G-
0x7f,0x08,0x08,0x08,0x7f,//-H-
0x00,0x41,0x7f,0x41,0x00,//-I-
0x20,0x40,0x41,0x3f,0x01,//-J-
0x7f,0x08,0x14,0x22,0x41,//-K-
0x7f,0x40,0x40,0x40,0x40,//-L-
0x7f,0x02,0x0c,0x02,0x7f,//-M-
0x7f,0x04,0x08,0x10,0x7f,//-N-
0x3e,0x41,0x41,0x41,0x3e,//-O-
0x7f,0x09,0x09,0x09,0x06,//-P-
0x3e,0x41,0x51,0x21,0x5e,//-Q-
0x7f,0x09,0x19,0x29,0x46,//-R-
0x46,0x49,0x49,0x49,0x31,//-S-
0x01,0x01,0x7f,0x01,0x01,//-T-
0x3f,0x40,0x40,0x40,0x3f,//-U-
0x1f,0x20,0x40,0x20,0x1f,//-V-
0x3f,0x40,0x38,0x40,0x3f,//-W-
0x63,0x14,0x08,0x14,0x63,//-X-
0x07,0x08,0x70,0x08,0x07,//-Y-
0x61,0x51,0x49,0x45,0x43,//-Z-
0x00,0x7f,0x41,0x41,0x00,//-[-
0x02,0x04,0x08,0x10,0x20,//-\-
0x00,0x41,0x41,0x7f,0x00,//-]-
0x04,0x02,0x01,0x02,0x04,//-^-
0x40,0x40,0x40,0x40,0x40,//-_-
0x01,0x02,0x04,0x00,0x00,//-`-
0x20,0x54,0x54,0x54,0x78,//-a-
0x7f,0x48,0x48,0x48,0x30,//-b-
0x38,0x44,0x44,0x44,0x44,//-c-
0x30,0x48,0x48,0x48,0x7f,//-d-
0x38,0x54,0x54,0x54,0x58,//-e-
0x00,0x08,0x7e,0x09,0x02,//-f-
0x48,0x54,0x54,0x54,0x3c,//-g-
0x7f,0x08,0x08,0x08,0x70,//-h-
0x00,0x00,0x7a,0x00,0x00,//-i-
0x20,0x40,0x40,0x3d,0x00,//-j-
0x7f,0x20,0x28,0x44,0x00,//-k
0x00,0x41,0x7f,0x40,0x00,//-l-
0x7c,0x04,0x38,0x04,0x7c,//-m-
0x7c,0x08,0x04,0x04,0x78,//-n-
0x38,0x44,0x44,0x44,0x38,//-o-
0x7c,0x14,0x14,0x14,0x08,//-p-
0x08,0x14,0x14,0x14,0x7c,//-q-
0x7c,0x08,0x04,0x04,0x08,//-r-
0x48,0x54,0x54,0x54,0x24,//-s-
0x04,0x04,0x3f,0x44,0x24,//-t-
0x3c,0x40,0x40,0x40,0x3c,//-u-
0x1c,0x20,0x40,0x20,0x1c,//-v-
0x3c,0x40,0x30,0x40,0x3c,//-w-
0x44,0x28,0x10,0x28,0x44,//-x-
0x04,0x48,0x30,0x08,0x04,//-y-
0x44,0x64,0x54,0x4c,0x44,//-z-
0x08,0x36,0x41,0x41,0x00,//-{-
0x00,0x00,0x77,0x00,0x00,//-|-
0x00,0x41,0x41,0x36,0x08,//-}-
0x04,0x02,0x02,0x02,0x01,//-~-
};
uchar code cheng1[]={
//-- 文字: 成 --
//-- 宋体23; 此字体下对应的点阵为:宽x 高=31x31 --
//-- 高度不是8 的倍数,现调整为:宽度x 高度=32x32 --
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,
0xFC,0xFC,0x88,0x00,0x00,0x1C,0x78,0xF0,0xE0,0x00,0x80,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xFF,0xFF,0x83,0x83,0x83,0x83,0x83,0x83,0xC3,0xC3,0x03,0x1F,
0xFF,0xFF,0x83,0x03,0x03,0x03,0xC3,0xF3,0xF3,0x63,0x03,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0xFC,0xFF,0x3F,0x00,0x80,0x00,0x00,0x80,0xFF,0xFF,0x03,0x00,0x00,0x03,
0x9F,0xFF,0xF8,0xF8,0xBE,0x1F,0x07,0x01,0x00,0x00,0xE0,0x20,0x00,0x00,0x20,0x38,
0x1F,0x07,0x01,0x00,0x00,0x01,0x01,0x07,0x07,0x23,0x31,0x18,0x0C,0x0E,0x07,0x03,
0x01,0x01,0x01,0x03,0x07,0x0F,0x0E,0x1C,0x1F,0x3F,0x30,0x00,0x00,0x00,0x00,0x00};
uchar code gong1[]={
//-- 文字: 功 --
//-- 宋体23; 此字体下对应的点阵为:宽x 高=31x31 --
//-- 高度不是8 的倍数,现调整为:宽度x 高度=32x32 --
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xC0,0xC0,0xC0,0x00,
0x00,0x00,0x00,0xFE,0xFC,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x0C,0x04,0x04,
0x04,0x84,0xFF,0xFF,0x04,0x04,0x04,0x04,0x04,0xFE,0xFE,0x04,0x00,0x00,0x00,0x00,
0xC0,0xC0,0xC0,0xC0,0xE0,0x60,0x7F,0x3F,0x30,0x30,0x10,0x18,0x18,0x88,0xC0,0xF8,
0x7F,0x1F,0x01,0x00,0x00,0x00,0x00,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x01,
0x01,0x00,0x00,0x00,0x00,0x20,0x20,0x30,0x18,0x0C,0x0C,0x07,0x03,0x01,0x00,0x04,
0x04,0x0C,0x0C,0x1C,0x38,0x3C,0x1F,0x0F,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
uchar code zhuang1[]={
//-- 文字: 状 --
//-- 宋体12; 此字体下对应的点阵为:宽x 高=16x16 --
0x08,0x30,0x00,0xFF,0x20,0x20,0x20,0x20,0xFF,0x20,0xE1,0x26,0x2C,0x20,0x20,0x00,
0x04,0x02,0x01,0xFF,0x40,0x20,0x18,0x07,0x00,0x00,0x03,0x0C,0x30,0x60,0x20,0x00};
uchar code tai1[]={
//-- 文字: 态 --
//-- 宋体12; 此字体下对应的点阵为:宽x 高=16x16 --
0x00,0x04,0x04,0x04,0x84,0x44,0x34,0x4F,0x94,0x24,0x44,0x84,0x84,0x04,0x00,0x00,
0x00,0x60,0x39,0x01,0x00,0x3C,0x40,0x42,0x4C,0x40,0x40,0x70,0x04,0x09,0x31,0x00};
uchar code shi1[]={
//-- 文字: 使 --
//-- 宋体12; 此字体下对应的点阵为:宽x 高=16x16 --
0x40,0x20,0xF0,0x1C,0x07,0xF2,0x94,0x94,0x94,0xFF,0x94,0x94,0x94,0xF4,0x04,0x00,
0x00,0x00,0x7F,0x00,0x40,0x41,0x22,0x14,0x0C,0x13,0x10,0x30,0x20,0x61,0x20,0x00};
uchar code yong1[]={
//-- 文字: 用 --
//-- 宋体12; 此字体下对应的点阵为:宽x 高=16x16 --
0x00,0x00,0x00,0xFE,0x22,0x22,0x22,0x22,0xFE,0x22,0x22,0x22,0x22,0xFE,0x00,0x00,
0x80,0x40,0x30,0x0F,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0x42,0x82,0x7F,0x00,0x00};
uchar code bmp_12864_1[]={
//-- 调入了一幅图像:D:\e\新开发部\显示图案收藏\12864G-202 回字框.bmp --
//-- 宽度x 高度=128x64 --
0xFF,0x01,0x01,0x01,0x01,0xF9,0x09,0x09,0x09,0x09,0x89,0x89,0x89,0x89,0x89,0x89,
点阵数据太多,删掉了一些,可以通过专业取模工具“zimo221.exe”来取模,这个工具也可找客服人员0755-29446830提供
};
uchar code bmp_12864_2[]={
//-- 调入了一幅图像:D:\e\新开发部\显示图案收藏\12864.bmp --
//-- 宽度x 高度=128x64 --
0x00,0x00,0x00,0x00,0x7E,0x2A,0x2A,0x2A,0x2A,0x2A,0x2A,0x7E,0x00,0x00,0x00,0x00,
点阵数据太多,删掉了一些,可以通过专业取模工具“zimo221.exe”来取模,这个工具也可找客服人员提供0755-29446830
};
uchar code bmp_12864_3[]={
//-- 调入了一幅图像:D:\e\新开发部\显示图案收藏\12864 无线固话菜单.bmp --
//-- 宽度x 高度=128x64 --
0x00,0x00,0x00,0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x00,0x00,0x00,0x00,
点阵数据太多,可以通过专业取模工具“zimo221.exe”来取模,这个工具也可找客服人员提供0755-29446830
};
uchar code bmp_12864_4[]={
//-- 调入了一幅图像:D:\e\新开发部\显示图案收藏\12864 英文.bmp --
//-- 宽度x 高度=128x64 --
0xFF,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
点阵数据太多,删掉了一些,可以通过专业取模工具“zimo221.exe”来取模,这个工具也可找客服人员提供0755-29446830
};
uchar code bmp_12864_5[]={
//-- 调入了一幅图像:D:\e\新开发部\显示图案收藏\12864G-139 大阿拉伯数字.bmp --
//-- 宽度x 高度=128x64 --
0xFF,0xFF,0x87,0x07,0x33,0x7B,0xFB,0xE3,0xE3,0x3F,0x0F,0xC7,0xE7,0xF3,0xFB,0xFB,
点阵数据太多,删掉了一些,可以通过专业取模工具“zimo221.exe”来取模,这个工具也可找客服人员提供0755-29446830
};
驰宇微首页 | 图形点阵液晶模块 | 中文字库液晶模块 | 字符型液晶模块 | 段码液晶模块 | 产品列表 | 站点地图 | 关于驰宇微
公司名称: 深圳驰宇微科技有限公司
备案号:粤ICP备14047421号
公司地址:深圳市龙华区大浪街道华昌路241号鸿源工业区E栋5层
公司电话:0755-29446830 13640934827
邮 箱:18926046819@163.com Q Q:577895076
版权归深圳驰宇微科技所有