1、12864+1302+18方案212864 DS1302 DS18B2012864为 PROTUES 里的HDG12864F-C由于代码过长,所以分两篇发布#includeat89x51.h#includeintrins.hsbit RES1=P20; /12864复位sbit A0=P21; /命令 数据选择sbit RW=P22; /读写选择sbit E=P23; /使能信号sbit B0=P00; /状态按钮sbit B1=P01; /执行加按钮sbit B2=P02; /执行减按钮sbit DQ=P30; /温度线sbit IO=P33; /DS1302 IO口设置sbit SCLK=
2、P32; /时钟线设置sbit CE=P31; /复位/片选脚设置unsigned char state_button,time_jia,time_jian; /按钮参数unsigned char code TU_JIANJIE=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,
3、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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
4、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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
5、0x00,0x00,0x00,0x00,0x20,0x60,0x30,0x28,0x24,0x23,0x20,0x20,0x24,0x28,0x30,0x60,0x00,0x00,0x00,0x80,0x60,0x00,0xFF,0x20,0xC0,0x00,0xFE,0x20,0xC0,0x00,0xFE,0x00,0x00,0x20,0x18,0x08,0x29,0x2E,0x28,0x29,0xAE,0xA8,0x6C,0x2B,0x08,0x28,0x18,0x00,0x00,0xFE,0x02,0x32,0xCE,0x90,0xAC,0xA4,0xA5,0xA6,0xA4,0xA4,
6、0x8C,0x84,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
7、0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x11,0x11,0x11,0x91,0x11,0x11,0x3F,0x00,0x00,0x00,0x00,0xA0,0x10,0x08,0x06,0x01,0x00,0x00,0x00,0x1F,0x80,0x00,0x00,0x3F,0x00,0x80,0x02,0x02,0x02,0x02,0x02,0x12,0x22,0x1F,0x02,0x82,0x02,0x02,0x03,0x02,0x00,0x00,0xBF,0x02,0x04,
8、0x23,0x20,0x10,0x0F,0x00,0x00,0x1F,0x20,0x20,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,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,
9、0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x08,0x04,0x04,0x08,0xF0,0x00,0x00,0x1C,0x04,0x84,0x64,0x1C,0x04,0x00,0x10,0x10,0x11,0xF3,0x00,0x10,0x10,0x10,0x10,0xFF,0x10,0x10,0x18,0x10,0x00,0x08,0x04,0x02,0xF9,0xAB,0xAD,0xA9,0xAA,0xA9,0xA9,0xFB,0x05,0x01,0x01,0x00,0x08,0x88,0x68,0xFF,0x28,
10、0x48,0x00,0xFF,0x01,0x01,0xFF,0x01,0x00,0x00,0x00,0x00,0x08,0x08,0xFC,0x00,0x00,0x00,0x00,0x11,0x11,0xFF,0x11,0x01,0x70,0x00,0xFF,0x21,0x21,0xFF,0x21,0x21,0x21,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,
11、0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x08,0x08,0x04,0x03,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x04,0x82,0x00,0x00,0x00,0x1F,0x80,0x00,0x80,0x00,0x00,0x02,0x12,0x12,0x0A,0x07,0x02,0x02,0x02,0x02,0x9F,0x02,0x02,
12、0x02,0x00,0x00,0x01,0x00,0x00,0x1F,0x90,0x08,0x04,0x03,0x00,0x00,0x8F,0x10,0x10,0x1E,0x00,0x00,0x08,0x08,0x0F,0x08,0x08,0x00,0x00,0x04,0x04,0x03,0x12,0x0A,0x04,0x02,0x09,0x08,0x08,0x0F,0x08,0x08,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
13、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,0x20,0x12,0x0A,0x7F,0x12,0x2D,0xD2,0x2D,0x12,0x0A,0x7F,0x0A,0x12,0x00,0x00,0x00,0x80,
14、0x40,0x30,0x0C,0x00,0x00,0xFF,0x00,0x04,0x84,0x48,0x10,0x20,0x00,0x90,0x9C,0xF3,0x92,0x92,0xA2,0x64,0x52,0x55,0xE9,0x55,0x53,0x20,0x20,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,
15、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,0x00,0x11,0x11,0x11,0x09,0x09,0x05,0x03,0x01,0x03,
16、0x05,0x09,0x11,0x11,0x11,0x00,0x00,0x10,0x10,0x10,0x08,0x08,0x04,0x05,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x04,0x02,0x04,0x05,0x05,0x05,0x1F,0x05,0x05,0x05,0x04,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,
17、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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
18、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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
19、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;unsigned char code TU_NIANYUERI=/*- 文字: 年 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x40,0x20,0x10,0x0C,0xE3,0x22,0x22,0x22,0xFE,0x22,0x22,0x22,0x22,0x02,0x00,0x00,0x04,0x
20、04,0x04,0x04,0x07,0x04,0x04,0x04,0xFF,0x04,0x04,0x04,0x04,0x04,0x04,0x00,/*- 文字: 月 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x00,0x00,0x00,0x00,0xFF,0x11,0x11,0x11,0x11,0x11,0xFF,0x00,0x00,0x00,0x00,0x00,0x40,0x20,0x10,0x0C,0x03,0x01,0x01,0x01,0x21,0x41,0x3F,0x00,0x00,0x00,0x00,/*- 文字: 日 -*/*- 宋体12;
21、 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x00,0x00,0xFE,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x3F,0x00,0x00,0x00,0x00,;unsigned char code TU_XINGQI= /*- 文字: 星 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x00,0x00,0xBE,0x2A,0x2A,0x2A,0xE
22、A,0x2A,0x2A,0x2A,0x2A,0x3E,0x00,0x00,0x00,0x00,0x48,0x46,0x41,0x49,0x49,0x49,0x7F,0x49,0x49,0x49,0x49,0x49,0x41,0x40,0x00,/*- 文字: 期 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x04,0xFF,0x54,0x54,0x54,0xFF,0x04,0x00,0xFE,0x22,0x22,0x22,0xFE,0x00,0x00,0x42,0x22,0x1B,0x02,0x02,0x0A,0x33,0x62,0x18,0x07,0x
23、02,0x22,0x42,0x3F,0x00,0x00,/*- 文字: 一 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*- 文字: 二 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x00,0x04,0x04,
24、0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x06,0x04,0x00,0x00,0x00,0x00,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x18,0x10,0x00,/*- 文字: 三 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x04,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x04,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20
25、,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,/*- 文字: 四 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x00,0xE0,0x20,0x20,0x20,0xE0,0x20,0xE0,0x20,0x20,0x20,0xE0,0xE0,0x00,0x00,0x00,0x00,0x1F,0x1C,0x1A,0x0B,0x09,0x08,0x0B,0x0A,0x0E,0x1A,0x1F,0x0F,0x00,0x00,/*- 文字: 五 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x
26、00,0x02,0x82,0x82,0x82,0x82,0xFE,0x82,0x82,0x82,0xC2,0x82,0x02,0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x3F,0x20,0x20,0x20,0x20,0x3F,0x20,0x20,0x30,0x20,0x00,/*- 文字: 六 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x10,0x10,0x10,0x10,0x10,0x91,0x12,0x1E,0x94,0x10,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x40,0x20,0
27、x10,0x0C,0x03,0x01,0x00,0x00,0x01,0x02,0x0C,0x78,0x30,0x00,0x00,/*- 文字: 日 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=16x16 -*/0x00,0x00,0x00,0xFE,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x3F,0x00,0x00,0x00,0x00;unsigned char code TU_SHUZI=/*
28、- 文字: 0 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,/*- 文字: 1 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,/*- 文字: 2 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0x
29、70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,/*- 文字: 3 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,/*- 文字: 4 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x
30、24,0x24,0x3F,0x24,0x00,/*- 文字: 5 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,/*- 文字: 6 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,/*- 文字: 7 -*/*- 宋体12; 此字体下对
31、应的点阵为:宽x高=8x16 -*/0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,/*- 文字: 8 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,/*- 文字: 9 -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,/*- 文字: - -*/*- 宋体12; 此字体下对应的点阵为:宽x高=8x16 -*/0x00,
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1