新聞中心

AM12864測試C語言程序

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

程序(

/********************************************/
/* 程序 1.0 */
/* Designed by Andorin LCM RD Group */
/********************************************/

#include reg51.h>
#include ctype.h>
#include string.h>
#include stdlib.h>
#include stdio.h>
#include math.h>
/********************************************/
/* 程序 1.0 */
/* Designed by Andorin LCM RD Group */
/********************************************/

/* Define the register command code */
#define Disp_On 0x3f
#define Disp_Off 0x3e
#define Col_Add 0x40
#define Page_Add 0xb8
#define Start_Line 0xc0
#define Lcd_Bus P1 //MCU P1------> LCM
sbit Mcs=P2^3; //Master chip enable
sbit Scs=P2^4; //Slave chip enable
sbit Enable=P2^2; //6800 mode Enable single
sbit Di=P2^0; //Data or Instrument Select
sbit RW=P2^1; //Write or Read
sbit Lcd_Rst=P2^5; //Lcm reset
sbit Test_Key=P3^1;

char code ce[]={/*-- 文字: 測 --*/0x08,0x31,0x86,0x60,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x00,0xF8,0x00,0x00,0xFF,0x00,
0x04,0xFC,0x03,0x00,0x80,0x47,0x30,0x0F,0x10,0x67,0x00,0x07,0x40,0x80,0x7F,0x00};
char code shi[]={/*-- 文字: 試 --*/0x40,0x42,0xDC,0x08,0x00,0x90,0x90,0x90,0x90,0x90,0xFF,0x10,0x12,0x1C,0x10,0x00,
0x00,0x00,0x7F,0x20,0x10,0x20,0x20,0x1F,0x10,0x10,0x01,0x06,0x18,0x20,0x78,0x00};
char code kai[]={/*-- 文字: 開 --*/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};
char code shi2[]={0x10,0x90,0x70,0x1F,0x12,0xF0,0x00,0x20,0x70,0x28,0x27,0x22,0x28,0x70,0x20,0x00,
0x40,0x21,0x12,0x0C,0x06,0x09,0x30,0x00,0x7F,0x21,0x21,0x21,0x21,0x7F,0x00,0x00};//始
char code wan[]={0x00,0x90,0x8C,0xA4,0xA4,0xA4,0xA5,0xA6,0xA4,0xA4,0xA4,0xA4,0x94,0x8C,0x04,0x00,
0x00,0x80,0x40,0x20,0x18,0x07,0x00,0x00,0x00,0x3F,0x40,0x40,0x40,0x70,0x00,0x00};//完
char code bi[]={0x00,0x00,0xFF,0x88,0x48,0x28,0x08,0x80,0x7F,0x88,0x88,0x88,0x84,0x84,0xE0,0x00,
0x04,0x04,0x04,0x04,0x04,0x04,0x04,0xFF,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00};//畢
char code yang[]={0x20,0x10,0x2C,0x23,0x6A,0xAA,0x2A,0xAA,0x6A,0x2A,0x2A,0x2A,0xEA,0x02,0x00,0x00,
0x00,0x10,0x11,0x15,0x15,0x15,0xFF,0x15,0x15,0x15,0x11,0x10,0x3F,0x40,0x30,0x00};
char code qi[]={0x40,0x20,0x58,0x47,0x54,0x54,0x54,0x54,0x54,0x54,0xD4,0x14,0x06,0x04,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x40,0x80,0x70,0x00};//氣
char code nong[]={0x10 ,0x21 ,0x62 ,0x06 ,0x90 ,0x0C ,0x04 ,0x84,0x64 ,0x9F ,0x04 ,0x04 ,0x94 ,0xCC ,0x00 ,0x00,
0x04 ,0x04 ,0xFE ,0x01 ,0x04 ,0x02 ,0x01 ,0xFF, 0x40 ,0x21 ,0x06 ,0x09 ,0x10 ,0x30 ,0x10 ,0x00 };//濃
char code du[]={0x00 ,0x00 ,0x0FC ,0x24 ,0x24 ,0x24 ,0x0FC ,0xA5, 0xA6 ,0xA4 ,0x0FC ,0x24 ,0x34 ,0x26 ,0x04 ,0x00,
0x40 ,0x20 ,0x9F ,0x80 ,0x42 ,0x42 ,0x26 ,0x2A, 0x12 ,0x2A ,0x26 ,0x42 ,0x40 ,0xC0 ,0x40 ,0x00};//度
char code bi2[]={0x00, 0x00, 0xFE, 0x40, 0x40, 0x60, 0x40, 0x00,0xFF, 0x80, 0x40, 0x20, 0x30, 0x00, 0x00, 0x00,
0x00, 0x40, 0x7F, 0x20, 0x20, 0x10, 0x10, 0x00,0x3F, 0x40, 0x40, 0x40, 0x40, 0x40, 0x78, 0x00};//比
char code fen[]={0x00 ,0x80 ,0x40 ,0x20 ,0x98 ,0x86 ,0x80 ,0x80,0x83 ,0x8C ,0x90 ,0x20 ,0xC0 ,0x80 ,0x80 ,0x00,
0x01 ,0x00 ,0x80 ,0x40 ,0x20 ,0x1F ,0x00 ,0x40, 0x80 ,0x40 ,0x3F ,0x00 ,0x00 ,0x01 ,0x00 ,0x00 };// 分
char code bai[]={0x02 ,0x02 ,0x02 ,0xE2 ,0x22 ,0x32 ,0x2A ,0x26,0x22 ,0x22 ,0x22 ,0xF2 ,0x22 ,0x03 ,0x02 ,0x00,
0x00 ,0x00 ,0x00 ,0xFF ,0x42 ,0x42 ,0x42 ,0x42, 0x42 ,0x42 ,0x42 ,0xFF ,0x00 ,0x00 ,0x00 ,0x00};// 百
char code wei[]={

0x20 ,0x20 ,0x20 ,0x22 ,0x24 ,0x2C ,0x20 , 0xE0,
0x3F ,0x20 ,0x20 ,0x20 ,0x20 ,0xF0 ,0x20 ,0x00,
0x00 ,0x40 ,0x20 ,0x10 ,0x08 ,0x04 ,0x03 ,0x00,
0x02 ,0x04 ,0x4C ,0x80 ,0x40 ,0x3F ,0x00 ,0x00
};//為


上一頁 1 2 3 下一頁

關(guān)鍵詞: AM12864測試 C語言 顯示漢字

評(píng)論


相關(guān)推薦

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

關(guān)閉