1、/*/#include#define uchar unsigned char#define uint unsigned intsbit key = P10;/定义切换画面开关uchar Key_num=0;/定义按键次数/*汉字与字符数据*/uchar code led=0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f;uchar code xlh =0x00,0x20,0x02,0x20,0x82,0x20,0x82,0x20,0x82,0x20,0x82,0x20,0x82,0x20,0xFE,0x3F,0x82,0x20,0x82,0x20,0x82,0x2
2、0,0x82,0x20,0xC3,0x20,0x82,0x30,0x00,0x20,0x00,0x00,/*“王“,0*/0x00,0x40,0x00,0x30,0xFC,0x0F,0x44,0x40,0x44,0x20,0x44,0x10,0x44,0x0C,0xC5,0x03,0x7E,0x00,0xC4,0x01,0x44,0x06,0x44,0x18,0x44,0x30,0x44,0x60,0x44,0x20,0x00,0x00,/*“庆“,1*/0x10,0x04,0x60,0x04,0x01,0xFE,0xC6,0x01,0x30,0x00,0x88,0x00,0x88,0xFE,
3、0x88,0x42,0x88,0x42,0xFF,0x42,0x88,0x42,0x88,0x42,0x88,0xFE,0x88,0x00,0x08,0x00,0x00,0x00,/*“洁“,2*/;uchar code xlh =0x20,0x21,0x24,0x11,0x2C,0x4D,0x35,0x81,0xE6,0x7F,0x34,0x05,0x2C,0x59,0x24,0x21,0x00,0x18,0xFC,0x07,0x24,0x00,0x24,0x00,0xE2,0xFF,0x22,0x00,0x22,0x00,0x00,0x00,/*“新“,0*/0x40,0x04,0x20,
4、0x04,0x10,0x04,0x0C,0x04,0xE3,0x07,0x22,0x04,0x22,0x04,0x22,0x04,0xFE,0xFF,0x22,0x04,0x22,0x04,0x22,0x04,0x22,0x04,0x02,0x04,0x00,0x04,0x00,0x00,/*“年“,1*/0x70,0x00,0x00,0x00,0xFF,0xFF,0x08,0x00,0xB0,0x80,0x88,0x40,0x88,0x30,0x88,0x0E,0xFF,0x01,0x88,0x06,0x88,0x08,0x88,0x30,0xF8,0x60,0x80,0xC0,0x80,0
5、x40,0x00,0x00,/*“快“,0*/0x00,0x00,0x00,0x20,0x40,0x18,0xFC,0x0C,0x44,0x07,0x44,0x12,0x44,0x20,0x46,0x40,0xFA,0x3F,0x42,0x00,0x43,0x00,0x43,0x02,0x42,0x0C,0x40,0x38,0x00,0x10,0x00,0x00,/*“乐“,1*/;uchar code Smile =0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
6、,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x1F,0x3C,0x3C,0x0E,0xF7,0x06,0xEF,0xF3,0xDC,0xF3,0xB0,0x63,0xB0,0x03,0xB0,0xF3,0xB0,0xF3,0xB8,0x03,0xDD,0x06,0xEF,0x0E,0x76,0x3C,0x3C,0xF8,0x1F
7、,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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 code wal=0x20,0x04,0x20,0x04,0x22,
8、0x42,0x22,0x82,0xFE,0x7F,0x21,0x01,0x21,0x01,0x20,0x10,0x20,0x10,0xFF,0x08,0x20,0x07,0x22,0x1A,0xAC,0x21,0x20,0x40,0x20,0xF0,0x00,0x00,/*“我“,0*/0x00,0x40,0x40,0x20,0xB2,0xA0,0x96,0x90,0x9A,0x4C,0x92,0x47,0xF6,0x2A,0x9A,0x2A,0x93,0x12,0x91,0x1A,0x99,0x26,0x97,0x22,0x91,0x40,0x90,0xC0,0x30,0x40,0x00,0
9、x00,/*“爱“,1*/0x80,0x00,0x40,0x00,0xF0,0x7F,0x2C,0x00,0x43,0x10,0x20,0x0C,0x98,0x03,0x0F,0x21,0x0A,0x40,0xE8,0x3F,0x08,0x00,0x88,0x00,0x28,0x03,0x1C,0x1C,0x08,0x08,0x00,0x00,/*“你“,2*/;uchar code love =0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
10、0x00,0x00,0x00,0x00,0xFE,0x3F,0x00,0x20,0x00,0x20,0x00,0x20,/L0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x0F,0x04,0x10,0x02,0x20,0x02,0x20,0x02,0x20,0x02,0x20,0x04,0x10,0xF8,0x0F,0x00,0x00,/O0x00,0x00,0x00,0x00,0xFE,0x07,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x20,0x00,0
11、x10,0x00,0x08,0xFE,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x3F,0x82,0x20,0x82,0x20,/V0x82,0x20,0x82,0x20,0x82,0x20,0x82,0x20,0x82,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/E;uchar code love_picture =0x00,0x00,0x00,0x00,0x00,0
12、x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x78,0x00,0xFC,0x00,0xFE,0x01,0xFE,0x03,0xFE,0x07,0xFE,0x0F,0xFE,0x1F,0xFC,0x3F,0xF8,0
13、x7F,0xFC,0x3F,0xFE,0x1F,0xFE,0x0F,0xFE,0x07,0xFE,0x03,0xFE,0x01,0xFC,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0
14、x00,0x00,0x00,/*心形图案*/;uchar code wal1=0x08,0x01,0x08,0x41,0x88,0x80,0xFF,0x7F,0x48,0x80,0x28,0x40,0x00,0x20,0x88,0x18,0xFF,0x07,0x08,0x02,0x08,0x04,0x08,0x00,0xF8,0x3F,0x00,0x40,0x00,0xF0,0x00,0x00,/*“执“,0*/0x00,0x01,0x00,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x41,0x02,0x81,0xE2,0x7F,0x12,0x01,0x
15、0A,0x01,0x06,0x01,0x02,0x01,0x00,0x01,0x80,0x01,0x00,0x01,0x00,0x00,/*“子“,1*/0x00,0x20,0x08,0x60,0x08,0x30,0x08,0x08,0x08,0x18,0x08,0x24,0x09,0x24,0x0A,0x22,0x0C,0x41,0x88,0x40,0x48,0x40,0x28,0x40,0x1C,0x40,0x08,0x40,0x00,0x40,0x00,0x00,/*“之“,2*/0x00,0x02,0x24,0x02,0x24,0x02,0x24,0x02,0x24,0x02,0x24
16、,0x42,0x24,0x82,0xFE,0x7F,0x22,0x02,0x22,0x02,0x22,0x02,0x22,0x02,0x22,0x02,0x20,0x02,0x00,0x02,0x00,0x00,/*“手“,3*/;uchar code xqwal=0x00,0x00,0x00,0x04,0x00,0x04,0x00,0x04,0x7E,0x04,0x48,0x04,0x48,0x04,0x48,0x04,0x48,0x04,0x48,0x24,0x48,0x46,0x48,0x44,0x48,0x20,0xCC,0x1F,0x08,0x00,0x00,0x00,/*“与“,0
17、*/0x00,0x01,0x00,0x01,0x02,0x01,0x02,0x01,0x02,0x01,0x02,0x41,0x02,0x81,0xE2,0x7F,0x12,0x01,0x0A,0x01,0x06,0x01,0x02,0x01,0x00,0x01,0x80,0x01,0x00,0x01,0x00,0x00,/*“子“,1*/0x40,0x00,0x20,0x00,0xF8,0xFF,0x07,0x00,0x02,0x00,0x7F,0x00,0x48,0xFF,0x28,0x49,0xA8,0x49,0x40,0x49,0x3F,0x49,0x48,0x49,0x44,0xFF
18、,0x46,0x00,0x74,0x00,0x00,0x00,/*“偕“,2*/0x40,0x08,0x44,0x08,0x44,0x04,0x44,0x04,0x44,0x02,0x44,0x3E,0x7F,0x49,0xC4,0x48,0xC4,0x44,0x44,0x44,0x64,0x42,0x54,0x42,0x4E,0x40,0x44,0x70,0x40,0x00,0x00,0x00,/*“老“,3*/;uchar code srkl=0x00,0x00,0x40,0x80,0x42,0x40,0x42,0x20,0x42,0x10,0x42,0x08,0x42,0x06,0xFE
19、,0x01,0x42,0x02,0x42,0x04,0x42,0x08,0x42,0x10,0x42,0x30,0x42,0x60,0x40,0x20,0x00,0x00,/*“天“,0*/0x00,0x00,0x40,0x80,0x42,0x40,0x42,0x20,0x42,0x10,0x42,0x08,0x42,0x06,0xFE,0x01,0x42,0x02,0x42,0x04,0x42,0x08,0x42,0x10,0x42,0x30,0x42,0x60,0x40,0x20,0x00,0x00,/*“天“,1*/0x40,0x00,0x42,0x40,0x42,0x20,0x42,0
20、x10,0x42,0x0C,0xFE,0x03,0x42,0x00,0x42,0x00,0x42,0x00,0x42,0x00,0xFE,0x7F,0x42,0x00,0x42,0x00,0x42,0x00,0x42,0x00,0x00,0x00,/*“开“,2*/0x00,0x04,0x80,0x03,0x00,0x00,0x00,0x00,0xF0,0x3F,0x00,0x40,0x01,0x40,0x02,0x40,0x1C,0x40,0x08,0x40,0x00,0x40,0x40,0x78,0x80,0x00,0x00,0x07,0x00,0x02,0x00,0x00,/*“心“,3
21、*/;uchar code ylg = /3 字0x00,0x00,0xF8,0xFF,0x01,0x00,0x06,0x10,0x20,0x1E,0xA8,0x12,0xEA,0x1E,0xBE,0x12,0xAA,0x1E,0xEA,0x12,0xA2,0x1E,0x22,0x50,0x02,0x80,0xFE,0x7F,0x00,0x00,0x00,0x00,/*“阖“,0*/0x00,0x00,0x18,0x29,0x04,0x29,0x14,0x15,0x94,0x14,0x94,0x4A,0xD5,0x89,0xB6,0x44,0x14,0x3F,0x14,0x06,0x94,0x
22、09,0x04,0x09,0x14,0x10,0x0C,0x30,0x04,0x10,0x00,0x00,/*“家“,1*/0x14,0x20,0x24,0x10,0x44,0x4C,0x84,0x43,0x64,0x43,0x1C,0x2C,0x20,0x20,0x18,0x10,0x0F,0x0C,0xE8,0x03,0x08,0x06,0x08,0x18,0x28,0x30,0x18,0x60,0x08,0x20,0x00,0x00,/*“欢“,2*/0x00,0x00,0x00,0x20,0x40,0x18,0xFC,0x0C,0x44,0x07,0x44,0x12,0x44,0x20
23、,0x46,0x40,0xFA,0x3F,0x42,0x00,0x43,0x00,0x43,0x02,0x42,0x0C,0x40,0x38,0x00,0x10,0x00,0x00,/*“乐“,3*/;uchar code ydkl= /4 字0x08,0x01,0xC8,0x40,0x38,0x70,0xFF,0x01,0x18,0x38,0x68,0x40,0x08,0x40,0x00,0x44,0xFE,0x59,0x2A,0x41,0x2A,0x41,0x2A,0x61,0x2A,0x01,0xFE,0x09,0x00,0x30,0x00,0x00,/*“想“,0*/0x80,0x00
24、,0x40,0x00,0xF0,0x7F,0x2C,0x00,0x43,0x10,0x20,0x0C,0x98,0x03,0x0F,0x21,0x0A,0x40,0xE8,0x3F,0x08,0x00,0x88,0x00,0x28,0x03,0x1C,0x1C,0x08,0x08,0x00,0x00,/*“你“,1*/0x00,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x40,0x02,0x80,0xF2,0x7F,0x12,0x00,0x0A,0x00,0x0A,0x00,0x06,0x00,0x06,0x00,0x02,0x00,
25、0x00,0x00,0x00,0x00,/*“了“,2*/;uchar code xll= /4 字0x00,0x00,0x00,0x80,0x00,0x41,0xF0,0x20,0x00,0x10,0x00,0x0C,0x00,0x03,0xFF,0x00,0x02,0x03,0x40,0x04,0x20,0x18,0x18,0x30,0x10,0x60,0x00,0x20,0x00,0x00,0x00,0x00,/*“火“,0*/0x00,0x00,0x00,0x48,0x00,0x46,0xBE,0x41,0x2A,0x49,0x2A,0x49,0x2A,0x49,0xEA,0x7F,0
26、x2A,0x49,0x2A,0x49,0x2A,0x49,0x2A,0x49,0x3E,0x49,0x00,0x41,0x00,0x40,0x00,0x00,/*“星“,1*/0x00,0x20,0x80,0x20,0x84,0x10,0x84,0x10,0x94,0x08,0xA4,0x04,0xC4,0x02,0xFF,0xFF,0x84,0x01,0xC4,0x02,0xB4,0x04,0x94,0x08,0x84,0x18,0x84,0x30,0x80,0x10,0x00,0x00,/*“来“,2*/0x00,0x00,0xF8,0x7F,0x8C,0x10,0x8B,0x10,0x8
27、8,0x10,0xF8,0x3F,0x40,0x00,0x30,0x00,0x8F,0x00,0x08,0x03,0x08,0x26,0x08,0x40,0x08,0x20,0xF8,0x1F,0x00,0x00,0x00,0x00,/*“的“,3*/;uchar code fqyz= /4;/*uchar code Thanks =;uchar code zzzs=;uchar code yzxl=;uchar code mtxcr=;uchar code znxf=;uchar code yxwo=;uchar code zjl=;*/*延时函数*/void delay(uint X)uint i;for(i=0;i9)/如果超过切换页面的次数就清零Key_num=0;delay(5000);while(key=0); /检测按键抬起delay(5000);/ P0=ledKey_num;