新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > STC12C5410AD AD的測試LCD12864顯示程序

STC12C5410AD AD的測試LCD12864顯示程序

作者: 時(shí)間:2013-05-11 來源:網(wǎng)絡(luò) 收藏

unsigned char code shuzi[]={
/*-- 文字: 0 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00, //0

/*-- 文字: 1 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, //1

/*-- 文字: 2 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00, //2

/*-- 文字: 3 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00, //3

/*-- 文字: 4 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,

/*-- 文字: 5 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,

/*-- 文字: 6 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,

/*-- 文字: 7 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,

/*-- 文字: 8 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,

/*-- 文字: 9 --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,

/*-- 文字: a --10*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20, //10

/*-- 文字: b --11*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00, //11

/*-- 文字: c --12*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00, //12

/*-- 文字: d --13*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20, //13

/*-- 文字: e --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00, //14

/*-- 文字: f --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, //15

/*-- 文字: g --16*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00, //16

/*-- 文字: h --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20, //17

/*-- 文字: i --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, //18

/*-- 文字: j --19*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00, //19

/*-- 文字: k --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00, //20

/*-- 文字: l --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00, //21

/*-- 文字: m --22*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F, //22

/*-- 文字: n --23*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20, //23

/*-- 文字: o --24*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00, //24

/*-- 文字: p --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00, //25

/*-- 文字: q --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80, //26

/*-- 文字: r --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00, //27

/*-- 文字: s --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00, //28

/*-- 文字: t --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00, //29

/*-- 文字: u --30*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20, //30

/*-- 文字: v --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00, //31

/*-- 文字: w --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00, //32

/*-- 文字: x --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00, //33

/*-- 文字: y --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00, //34

/*-- 文字: z --35*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00, //35

/*-- 文字: - --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01, //36

/*-- 文字: = --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00, //37

/*-- 文字: --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00, //38

/*-- 文字: --39*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //39

/*-- 文字: [ --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00, //40

/*-- 文字: ] --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00, //41

/*-- 文字: ; --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00, //42

/*-- 文字: ’ --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, //43

/*-- 文字: , --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00, //44

/*-- 文字: . --45*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00, //45

/*-- 文字: / --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00, //46

/*-- 文字: : --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00, //47


/*-- 文字: Q --*/
/*-- 宋體12; 此字體下對應(yīng)的點(diǎn)陣為:寬x高=8x16 --*/
0x07,0x08,0x10,0x10,0x10,0x08,0x07,0x00,0xF0,0x18,0x24,0x24,0x1C,0x0A,0xF2,0x00 //48
};
//---------------------------------------
//名稱: 延時(shí)函數(shù)
//-----------------------------------------
void delay(unsigned int t)
{
unsigned int i,j;
for(i=0;it;i++)
{
for(j=0;j10;j++);
}
}
//---------------------------------------
//名稱: 寫一個(gè)命令字節(jié)到LCD函數(shù)
//-----------------------------------------
void write_com(unsigned char cmdcode)
{

Rs=0;
RW=0;
Lcd_Bus=cmdcode;
delay(0);
Ce=1;
delay(0);
Ce=0;
}
//---------------------------------------
//名稱: 寫一個(gè)數(shù)據(jù)字節(jié)到LCD函數(shù)
//-----------------------------------------
void write_data(unsigned char Rsspdata)
{

Rs=1;
RW=0;
Lcd_Bus=Rsspdata;
delay(0);
Ce=1;
delay(0);
Ce=0;
}
//---------------------------------------
//名稱: 清屏函數(shù)
//-----------------------------------------
void Clr_Scr(void)
{
unsigned char j,k;
Cs1=1;
Cs2=1;
write_com(Page_Add+0);
write_com(Col_Add+0);

for(k=0;k8;k++)
{
write_com(Page_Add+k);
for(j=0;j64;j++)write_data(0x00);
}
}
//---------------------------------------
//名稱: 寫入地址函數(shù)
//-----------------------------------------
void werite_x_y(unsigned char x,unsigned char y)
{
y=y0x7f;
x=x0x07;
if(y64)
{
Cs1=1;
Cs2=0;
write_com(Col_Add+y);
}
else
{
Cs1=0;
Cs2=1;
y=0x3f;
write_com(Col_Add+y);
}
write_com(Page_Add+x);
}

萬能遙控器相關(guān)文章:萬能遙控器代碼




評論


相關(guān)推薦

技術(shù)專區(qū)

關(guān)閉