找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 4102|回复: 4
打印 上一主题 下一主题
收起左侧

12864单片机仿真 自动化控制系统

[复制链接]
跳转到指定楼层
楼主
基于12864的单片机仿真直接可以用

  1. /*
  2.    
  3. */
  4. //*P1.0                     Y0: 正转
  5. //*P1.1                 Y1: 反转
  6. //*P1.2                 Y2: 运行
  7. //*P1.3                 E:          *P3.7
  8. //*P1.4                 RW:         *P3.6
  9. //*P1.5                 DI:         *P3.5
  10. //*P1.6                 CS1:        *P3.3
  11. //*P1.7                 CS2:        *P3.4
  12. //P2:                液晶数据线
  13. #include <AT89X52.H>
  14. #include <1210.H>                            //控制板输入输出定义
  15. #define TIMER0_COUNT 0xDC11      
  16. static unsigned timer0_tick;
  17. unsigned int                demp;                //定时时间
  18. unsigned int                  deda1;
  19. /*绘图型 LCD 指令 */
  20. #define  GLCD_OFF                     62         //显示器关闭
  21. #define  GLCD_ON                      63         //显示器打开
  22. #define  GLCD_START_LINE_0            192         //设开始坐标
  23. #define  SET_PAGE                    184         //设页数(X坐标)
  24. #define  SET_Y_ADDRESS_0             64         //设X坐标
  25. #define  CLEAR                       0    //设页数(X坐标)
  26. /*绘图型 LCD 控制线 */
  27. #define  ENABLE                          1
  28. #define  DISABLE                0
  29. #define  READ                            1
  30. #define  WRITE                               0
  31. #define  COMMAND                          0
  32. #define  DATA                        1
  33. #define  GLCD_CS2                   P3_3
  34. #define  GLCD_CS1                   P3_4
  35. #define  GLCD_D_I                   P3_5
  36. #define  GLCD_R_W                         P3_6
  37. #define  GLCD_ENABLE                      P3_7
  38. /*********************************************************************/
  39. /********************字库***********************************************/
  40. /*********************************************************************/
  41. unsigned char code digit[10][2][16]=
  42. {{{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x00},
  43. {0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,0x00,0x00,0x00}},/*"0",9*/
  44. {{0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  45. {0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,0x00,0x00,0x00}},/*"1",0*/
  46. {{0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x00,0x00},
  47. {0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,0x00,0x00,0x00}},/*"2",1*/
  48. {{0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x00,0x00},
  49. {0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,0x00,0x00,0x00}},/*"3",2*/
  50. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x00,0x00},
  51. {0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,0x00,0x00,0x00}},/*"4",3*/
  52. {{0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x00,0x00},
  53. {0x00,0x00,0x00,0x00,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,0x00,0x00,0x00}},/*"5",4*/
  54. {{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x00,0x00},
  55. {0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,0x00,0x00,0x00}},/*"6",5*/
  56. {{0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00},
  57. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*"7",6*/
  58. {{0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x00,0x00},
  59. {0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,0x00,0x00,0x00}},/*"8",7*/
  60. {{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x00},
  61. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,0x00,0x00,0x00}}};/*"9",8*/
  62. //(:)
  63. unsigned char code comma[2][16]=
  64. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  65. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00}};/*":",0*/
  66. unsigned char code space[2][16]=
  67. {{0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00},
  68. {0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00}};        
  69. unsigned char code GUOLI[8][2][16]=
  70. {{{0x80,0x81,0x8E,0x04,0x00,0x10,0x50,0x90,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x00},
  71. {0x40,0x20,0x1F,0x20,0x20,0x40,0x40,0x43,0x41,0x48,0x50,0x4F,0x40,0x40,0x40,0x00}},/*"过",0*/
  72. {{0x10,0x20,0x81,0x66,0x00,0xF8,0x48,0x48,0xFF,0x2A,0x2A,0x2A,0xAA,0x18,0x08,0x00},
  73. {0x04,0x7C,0x43,0x20,0x18,0x37,0x00,0x38,0x41,0x45,0x49,0x41,0x71,0x08,0x30,0x00}},/*"滤",1*/
  74. {{0x00,0xFC,0x44,0x44,0x44,0xFC,0x10,0x90,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x00},
  75. {0x00,0x07,0x04,0x04,0x04,0x07,0x00,0x00,0x03,0x40,0x80,0x7F,0x00,0x00,0x00,0x00}},/*"时",2*/
  76. {{0x00,0xF8,0x01,0x06,0x00,0xF0,0x92,0x92,0x92,0x92,0xF2,0x02,0x02,0xFE,0x00,0x00},
  77. {0x00,0xFF,0x00,0x00,0x00,0x07,0x04,0x04,0x04,0x04,0x07,0x40,0x80,0x7F,0x00,0x00}}};/*"间",3*/
  78. unsigned char code XIAOSHI[8][2][16]=
  79. {
  80. {{0x00,0x00,0x00,0xC0,0x70,0x20,0x00,0xFF,0x00,0x10,0x20,0xC0,0x80,0x00,0x00,0x00},
  81. {0x04,0x02,0x01,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x01,0x07,0x02,0x00}},/*"小",8*/
  82. {{0x00,0xFC,0x44,0x44,0x44,0xFC,0x10,0x90,0x10,0x10,0x10,0xFF,0x10,0x10,0x10,0x00},
  83. {0x00,0x07,0x04,0x04,0x04,0x07,0x00,0x00,0x03,0x40,0x80,0x7F,0x00,0x00,0x00,0x00}}};/*"时",9*/
  84. unsigned char code QINGXIE[8][2][16]=
  85. /*****************************************************************/
  86. {{{0x10,0x61,0x06,0xE0,0x18,0x20,0xAA,0xAA,0xAA,0xBF,0xAA,0xAA,0xAA,0x2A,0x00,0x00},
  87. {0x04,0x04,0xFF,0x00,0x00,0x00,0xFF,0x0A,0x0A,0x0A,0x4A,0x8A,0x7F,0x00,0x00,0x00}},/*"清",0*/
  88. {{0x10,0x61,0x06,0xF0,0xA0,0x98,0x8E,0x88,0x88,0xFF,0x88,0x88,0x88,0x80,0x80,0x00},
  89. {0x04,0x04,0xFF,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x3F,0x40,0x40,0x40,0x70,0x00}}};/*"洗",1*/

  90. unsigned char code MIAO[2][16]=
  91. {{0x12,0x12,0xD2,0xFE,0x91,0x11,0xC0,0x38,0x10,0x00,0xFF,0x00,0x08,0x10,0x60,0x00},
  92. {0x04,0x03,0x00,0xFF,0x00,0x83,0x80,0x40,0x40,0x20,0x23,0x10,0x08,0x04,0x03,0x00}};/*"秒",0*/
  93. unsigned char code ZHIDONG[8][2][16]=                                                                                                   
  94. /*****************************************************************/
  95. {{{0x00,0x00,0x00,0xF8,0x48,0x48,0x4C,0x4B,0x4A,0x48,0x48,0x48,0xF8,0x00,0x00,0x00},
  96. {0x00,0x00,0x00,0xFF,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xFF,0x00,0x00,0x00}},/*"自",0*/
  97. {{0x20,0x24,0x24,0xE4,0x24,0x24,0x24,0x20,0x10,0x10,0xFF,0x10,0x10,0xF0,0x00,0x00},
  98. {0x08,0x1C,0x0B,0x08,0x0C,0x05,0x4E,0x24,0x10,0x0C,0x03,0x20,0x40,0x3F,0x00,0x00}},/*"动",1*/
  99. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  100. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*":",0*/
  101. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",4*/
  102. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*" ",5*/
  103. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",6*/
  104. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*" ",7*/
  105. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",8*/
  106. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*" ",9*/
  107. {{0x10,0x61,0x06,0xE0,0x18,0x20,0xAA,0xAA,0xAA,0xBF,0xAA,0xAA,0xAA,0x2A,0x00,0x00},
  108. {0x04,0x04,0xFF,0x00,0x00,0x00,0xFF,0x0A,0x0A,0x0A,0x4A,0x8A,0x7F,0x00,0x00,0x00}},/*"清",10*/
  109. {{0x10,0x61,0x06,0xF0,0xA0,0x98,0x8E,0x88,0x88,0xFF,0x88,0x88,0x88,0x80,0x80,0x00},
  110. {0x04,0x04,0xFF,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x3F,0x40,0x40,0x40,0x70,0x00}}};/*"洗",11*/
  111. unsigned char code DANCHENG[2][2][16]=
  112. /*****************************************************************/
  113. {{{0x00,0x00,0xF8,0x28,0x29,0x2E,0x2A,0xF8,0x28,0x2C,0x2B,0x2A,0xF8,0x00,0x00,0x00},
  114. {0x08,0x08,0x0B,0x09,0x09,0x09,0x09,0xFF,0x09,0x09,0x09,0x09,0x0B,0x08,0x08,0x00}},/*"单",0*/
  115. {{0x10,0x12,0xD2,0xFE,0x91,0x11,0x80,0xBF,0xA1,0xA1,0xA1,0xA1,0xBF,0x80,0x00,0x00},
  116. {0x04,0x03,0x00,0xFF,0x00,0x41,0x44,0x44,0x44,0x7F,0x44,0x44,0x44,0x44,0x40,0x00}}};/*"程",1*/
  117. unsigned char code SHUANGCHENG[2][2][16]=
  118. /*****************************************************************/
  119. {{{0x00,0x12,0x22,0x42,0x82,0x62,0x1E,0x00,0x1E,0xE2,0x02,0x02,0xE2,0x1E,0x00,0x00},
  120. {0x20,0x10,0x08,0x06,0x01,0x03,0x4E,0x24,0x10,0x09,0x06,0x09,0x10,0x60,0x20,0x00}},/*"双",0*/
  121. {{0x10,0x12,0xD2,0xFE,0x91,0x11,0x80,0xBF,0xA1,0xA1,0xA1,0xA1,0xBF,0x80,0x00,0x00},
  122. {0x04,0x03,0x00,0xFF,0x00,0x41,0x44,0x44,0x44,0x7F,0x44,0x44,0x44,0x44,0x40,0x00}}};/*"程",1*/
  123. unsigned char code LIANXI[2][2][16]=
  124. /*****************************************************************/
  125. {{{0x40,0x41,0x4E,0xC4,0x00,0x44,0xE4,0x5C,0x47,0xF4,0x44,0x44,0x44,0x04,0x00,0x00},
  126. {0x00,0x40,0x20,0x1F,0x22,0x42,0x42,0x42,0x42,0x5F,0x42,0x42,0x42,0x42,0x42,0x00}},/*"连",0*/
  127. {{0x20,0x30,0xA8,0x67,0x12,0x00,0x90,0x34,0xD4,0x1F,0xF4,0x14,0x54,0x34,0x10,0x00},
  128. {0x22,0x23,0x22,0x12,0x10,0x02,0x02,0x43,0x22,0x1A,0x07,0x0A,0x12,0x62,0x02,0x00}}};/*"续",1*/
  129. /******************************************************************/
  130. char code SHOUDONGHZ[4][2][16]=
  131. {{{0x00,0x24,0x24,0x24,0x24,0x24,0x24,0xFE,0xFE,0x22,0x22,0x22,0x22,0x22,0x20,0x00},
  132. {0x02,0x02,0x02,0x02,0x02,0x42,0xC2,0xFF,0x7F,0x02,0x02,0x02,0x02,0x02,0x02,0x02}},/*"手",0*/
  133. {{0x20,0x24,0x24,0xE4,0xE4,0x24,0x24,0x24,0x30,0x10,0xFF,0xFF,0x10,0xF0,0xF0,0x00},
  134. {0x08,0x1C,0x1F,0x0B,0x0C,0x0D,0x4F,0x6E,0x34,0x1C,0x0F,0x23,0x60,0x7F,0x3F,0x00}},/*"动",1*/
  135. {{0x08,0x38,0x30,0xFF,0xFF,0x20,0x20,0x20,0xFF,0xFF,0xE1,0xE7,0x2E,0x2C,0x20,0x20},
  136. {0x04,0x06,0x03,0xFF,0xFF,0x60,0x38,0x1F,0x07,0x00,0x03,0x0F,0x3C,0x70,0x60,0x20}},/*"状",0*/
  137. {{0x00,0x04,0x04,0x04,0x84,0xC4,0x74,0x7F,0xDF,0xB4,0x64,0xC4,0x84,0x84,0x04,0x00},
  138. {0x00,0x60,0x79,0x39,0x01,0x3C,0x7C,0x42,0x4E,0x4C,0x40,0x70,0x74,0x0D,0x39,0x31}}};/*"态",1*/
  139. char code SHANG[4][2][16]=
  140. {{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  141. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*" ",3*/
  142. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00},
  143. {0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x7F,0x40,0x40,0x40,0x40,0x40,0x60,0x40,0x00}},/*"上",0*/
  144. {{0x00,0x40,0x44,0x44,0x44,0xFE,0x42,0x42,0x40,0x40,0xFE,0x40,0x40,0x60,0x40,0x00},
  145. {0x00,0x40,0x20,0x10,0x0C,0x03,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00}},/*"升",0*/
  146. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  147. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};/*" ",3*/
  148. char code XIA[4][2][16]=
  149. {{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  150. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*" ",3*/
  151. {{0x00,0x02,0x02,0x02,0x02,0x02,0x02,0xFE,0x22,0x62,0xC2,0x82,0x02,0x03,0x02,0x00},
  152. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00}},/*"下",1*/
  153. {{0x00,0xFE,0x22,0x5A,0x86,0x00,0x48,0x44,0x2B,0xD2,0x2A,0x26,0x42,0x40,0x40,0x00},
  154. {0x00,0xFF,0x02,0x04,0x03,0x00,0x0D,0x09,0x09,0xFF,0x09,0x09,0x09,0x08,0x00,0x00}},/*"降",0*/
  155. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  156. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};/*" ",3*/
  157. char code WU[2][16]=
  158. {{0x00,0x40,0x42,0x42,0x42,0x42,0x42,0xFE,0xC2,0x42,0x42,0x42,0x42,0x42,0x40,0x00},
  159. {0x40,0x40,0x20,0x10,0x08,0x04,0x03,0x00,0x3F,0x40,0x40,0x40,0x40,0x40,0x70,0x00}};/*"无",0*/
  160. unsigned char code QINGPIN[8][2][16]=
  161. /*****************************************************************/
  162. {{{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  163. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*1*/
  164. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  165. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*2*/
  166. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  167. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*3*/
  168. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  169. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*4*/
  170. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  171. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*5*/
  172. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  173. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*6*/
  174. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  175. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*7*/
  176. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
  177. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}}};/*8*/
  178. /**************************************************************************************/
  179. unsigned char code KAIGUAN[6][2][16]=
  180. {{
  181. {0x08,0x88,0x68,0xFF,0x28,0x48,0x10,0x48,0x44,0x43,0x44,0x48,0x50,0x10,0x10,0x00},
  182. {0x02,0x01,0x00,0x7F,0x00,0x20,0x22,0x2C,0x21,0x2E,0x30,0x28,0x27,0x22,0x20,0x00}},/*"检",2*/
  183. {{0x08,0x31,0x86,0x60,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x00,0xF8,0x00,0x00,0xFF,0x00},
  184. {0x04,0xFC,0x03,0x00,0x80,0x47,0x30,0x0F,0x10,0x67,0x00,0x07,0x40,0x80,0x7F,0x00}},/*"测",3*/
  185. {{0xFE,0x02,0x32,0x4E,0x82,0x00,0xFE,0x4A,0xCA,0x4A,0x4A,0x4A,0x7E,0x00,0x00,0x00},
  186. {0xFF,0x00,0x02,0x04,0x03,0x00,0xFF,0x40,0x20,0x03,0x0C,0x12,0x21,0x60,0x20,0x00}},/*"限",4*/
  187. {{0x00,0xC0,0x30,0xEC,0x03,0x2A,0xC8,0x09,0x0A,0x0E,0x08,0xE8,0x48,0x08,0x00,0x00},
  188. {0x01,0x00,0x00,0x7F,0x20,0x20,0x20,0x27,0x20,0x30,0x2E,0x21,0x20,0x20,0x20,0x00}},/*"位",5*/
  189. {{0x00,0x40,0x20,0x18,0x16,0x10,0x10,0xFF,0x10,0x10,0x10,0x10,0x10,0x00,0x00,0x00},
  190. {0x00,0x01,0x81,0x41,0x21,0x11,0x0D,0x03,0x05,0x09,0x31,0x61,0xC1,0x41,0x01,0x00}},/*"失",6*/
  191. {{0x00,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x20,0xF8,0x17,0x12,0x10,0xF0,0x10,0x10,0x00},
  192. {0x00,0x40,0x31,0x0C,0x03,0x04,0xB9,0x50,0x20,0x13,0x0C,0x13,0x60,0xC0,0x40,0x00}}};/*"败",7*/
  193. unsigned char code QIANXUAN[4][2][16]=
  194. {{
  195. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x40,0x40,0x40,0x40,0x40,0x00,0x00,0x00},
  196. {0x00,0x40,0x40,0x40,0x40,0x40,0x40,0x7F,0x40,0x40,0x40,0x40,0x40,0x60,0x40,0x00}},/*"上",0*/
  197. {{0x00,0x40,0x44,0x44,0x44,0xFE,0x42,0x42,0x40,0x40,0xFE,0x40,0x40,0x60,0x40,0x00},
  198. {0x00,0x40,0x20,0x10,0x0C,0x03,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00}},/*"升",1*/
  199. {{0xFE,0x02,0x32,0x4E,0x82,0x00,0xFE,0x4A,0xCA,0x4A,0x4A,0x4A,0x7E,0x00,0x00,0x00},
  200. {0xFF,0x00,0x02,0x04,0x03,0x00,0xFF,0x40,0x20,0x03,0x0C,0x12,0x21,0x60,0x20,0x00}},/*"限",0*/
  201. {{0x00,0xC0,0x30,0xEC,0x03,0x2A,0xC8,0x09,0x0A,0x0E,0x08,0xE8,0x48,0x08,0x00,0x00},
  202. {0x01,0x00,0x00,0x7F,0x20,0x20,0x20,0x27,0x20,0x30,0x2E,0x21,0x20,0x20,0x20,0x00}}};/*"位",1*/
  203. unsigned char code HOUXUAN[4][2][16]=
  204. {{
  205. {0x00,0x02,0x02,0x02,0x02,0x02,0x02,0xFE,0x22,0x62,0xC2,0x82,0x02,0x03,0x02,0x00},
  206. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00}},/*"下",0*/
  207. {{0x00,0xFE,0x22,0x5A,0x86,0x00,0x48,0x44,0x2B,0xD2,0x2A,0x26,0x42,0x40,0x40,0x00},
  208. {0x00,0xFF,0x02,0x04,0x03,0x00,0x0D,0x09,0x09,0xFF,0x09,0x09,0x09,0x08,0x00,0x00}},/*"降",1*/
  209. {{0xFE,0x02,0x32,0x4E,0x82,0x00,0xFE,0x4A,0xCA,0x4A,0x4A,0x4A,0x7E,0x00,0x00,0x00},
  210. {0xFF,0x00,0x02,0x04,0x03,0x00,0xFF,0x40,0x20,0x03,0x0C,0x12,0x21,0x60,0x20,0x00}},/*"限",0*/
  211. {{0x00,0xC0,0x30,0xEC,0x03,0x2A,0xC8,0x09,0x0A,0x0E,0x08,0xE8,0x48,0x08,0x00,0x00},
  212. {0x01,0x00,0x00,0x7F,0x20,0x20,0x20,0x27,0x20,0x30,0x2E,0x21,0x20,0x20,0x20,0x00}}};/*"位",1*/
  213. unsigned char code CHUWU[4][2][16]=        
  214. {{
  215. {0x00,0x02,0xE6,0x2A,0x32,0x22,0x3E,0x22,0x22,0x3E,0x22,0x32,0x2E,0x23,0x22,0x00},
  216. {0x40,0x30,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*"严",0*/
  217. {{0x08,0x08,0x0A,0xEA,0xAA,0xAA,0xAA,0xFF,0xA9,0xA9,0xA9,0xE9,0x08,0x08,0x08,0x00},
  218. {0x40,0x40,0x48,0x4B,0x4A,0x4A,0x4A,0x7F,0x4A,0x4A,0x4A,0x4B,0x48,0x40,0x40,0x00}},/*"重",1*/
  219. {{0x40,0x30,0x2C,0xE7,0x24,0x24,0x40,0x48,0x7F,0x48,0x48,0x7F,0x48,0x48,0x40,0x00},
  220. {0x01,0x01,0x01,0xFF,0x41,0x21,0x00,0xFF,0x49,0x49,0x49,0x49,0x49,0xFF,0x00,0x00}},/*"错",2*/
  221. {{0x40,0x41,0xCE,0x04,0x00,0x40,0x5F,0x51,0x51,0xD1,0x51,0x51,0x5F,0x40,0x00,0x00},
  222. {0x00,0x00,0x3F,0x10,0x88,0x42,0x22,0x12,0x0A,0x07,0x0A,0x12,0x22,0xE2,0x42,0x00}}};/*"误",3*/
  223. unsigned char code LIANLU[6][2][16]=
  224. {{
  225. {0x40,0x42,0x4C,0xC4,0x00,0x22,0xAA,0xAA,0xAA,0xBF,0xAA,0xAA,0xAA,0x22,0x20,0x00},
  226. {0x00,0x00,0x00,0x7F,0x20,0x10,0xFF,0x0A,0x0A,0x0A,0x4A,0x8A,0x7F,0x00,0x00,0x00}},/*"请",0*/
  227. {{0x02,0xFE,0x92,0x92,0x92,0xFE,0x12,0x11,0x12,0x1C,0xF0,0x18,0x17,0x12,0x10,0x00},
  228. {0x08,0x1F,0x08,0x08,0x04,0xFF,0x05,0x81,0x41,0x31,0x0F,0x11,0x21,0xC1,0x41,0x00}},/*"联",1*/
  229. {{0x20,0x38,0xA7,0x62,0x30,0x00,0x10,0x08,0x9F,0x64,0x64,0x94,0x0C,0x00,0x00,0x00},
  230. {0x22,0x23,0x12,0x12,0x12,0x04,0x02,0x7F,0x22,0x22,0x22,0x22,0x7F,0x03,0x02,0x00}},/*"络",2*/
  231. {{0x40,0x20,0xF8,0x17,0x02,0x10,0x10,0xFE,0x10,0x10,0x10,0xFE,0x10,0x10,0x00,0x00},
  232. {0x00,0x00,0xFF,0x00,0x42,0x22,0x1A,0x0F,0x02,0x02,0x06,0x1B,0x72,0x22,0x02,0x00}},/*"供",3*/
  233. {{0x00,0x10,0x08,0xBC,0x87,0x82,0x88,0x88,0x9F,0xA4,0xA4,0xA4,0x22,0x32,0x00,0x00},
  234. {0x00,0x00,0x80,0x9F,0x40,0x20,0x10,0x0E,0x10,0x20,0x60,0xCF,0x40,0x00,0x00,0x00}},/*"货",4*/
  235. {{0x00,0x04,0xE4,0x24,0x24,0xAC,0x74,0x25,0x26,0x74,0xAC,0x24,0xE4,0x04,0x00,0x00},
  236. {0x00,0x00,0xFF,0x01,0x01,0x3F,0x09,0x09,0x09,0x1F,0x41,0x80,0x7F,0x00,0x00,0x00}}};/*"商",5*/
  237. unsigned char code HUANYIN[4][2][16]=
  238. {{
  239. {0x14,0x24,0x44,0x84,0x64,0x1C,0x20,0x18,0x0F,0xE8,0x08,0x08,0x28,0x18,0x08,0x00},
  240. {0x20,0x10,0x4C,0x43,0x43,0x2C,0x20,0x10,0x0C,0x03,0x06,0x18,0x30,0x60,0x20,0x00}},/*"欢",0*/{
  241. {0x40,0x41,0xCE,0x04,0x00,0xFC,0x04,0x02,0x02,0xFC,0x04,0x04,0x04,0xFC,0x00,0x00},
  242. {0x40,0x20,0x1F,0x20,0x40,0x47,0x42,0x41,0x40,0x5F,0x40,0x42,0x44,0x43,0x40,0x00}},/*"迎",1*/{
  243. {0x40,0x20,0xF0,0x1C,0x07,0xF2,0x94,0x94,0x94,0xFF,0x94,0x94,0x94,0xF4,0x04,0x00},
  244. {0x00,0x00,0x7F,0x00,0x40,0x41,0x22,0x14,0x0C,0x13,0x10,0x30,0x20,0x61,0x20,0x00}},/*"使",2*/{
  245. {0x00,0x00,0x00,0xFE,0x22,0x22,0x22,0x22,0xFE,0x22,0x22,0x22,0x22,0xFE,0x00,0x00},
  246. {0x80,0x40,0x30,0x0F,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0x42,0x82,0x7F,0x00,0x00}}};/*"用",3*/
  247. unsigned char code HENFENG[6][2][16]=
  248. {{
  249. {0x00,0x00,0x00,0xF8,0x48,0x48,0x4C,0x4B,0x4A,0x48,0x48,0x48,0xF8,0x00,0x00,0x00},
  250. {0x00,0x00,0x00,0xFF,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0xFF,0x00,0x00,0x00}},/*"自",0*/  
  251. {{0x20,0x24,0x24,0xE4,0x24,0x24,0x24,0x20,0x10,0x10,0xFF,0x10,0x10,0xF0,0x00,0x00},
  252. {0x08,0x1C,0x0B,0x08,0x0C,0x05,0x4E,0x24,0x10,0x0C,0x03,0x20,0x40,0x3F,0x00,0x00}},/*"动",1*/
  253. {{0x08,0x08,0x08,0xFF,0x88,0x48,0x00,0x98,0x48,0x28,0x0A,0x2C,0x48,0xD8,0x08,0x00},
  254. {0x02,0x42,0x81,0x7F,0x00,0x00,0x40,0x42,0x42,0x42,0x7E,0x42,0x42,0x42,0x40,0x00}},/*"控",2*/
  255. {{0x00,0x50,0x4F,0x4A,0x48,0xFF,0x48,0x48,0x48,0x00,0xFC,0x00,0x00,0xFF,0x00,0x00},
  256. {0x00,0x00,0x3F,0x01,0x01,0xFF,0x21,0x61,0x3F,0x00,0x0F,0x40,0x80,0x7F,0x00,0x00}},/*"制",3*/
  257. {{0x00,0x00,0x02,0x22,0xB2,0xAA,0x66,0x62,0x22,0x11,0x4D,0x81,0x01,0x01,0x00,0x00},
  258. {0x00,0x40,0x21,0x13,0x09,0x05,0x41,0x81,0x7F,0x01,0x05,0x09,0x13,0x62,0x00,0x00}},/*"系",4*/
  259. {{0x20,0x30,0x2C,0xA3,0x60,0x10,0x84,0xC4,0xA4,0x9D,0x86,0x84,0xA4,0xC4,0x84,0x00},
  260. {0x20,0x22,0x23,0x12,0x12,0x92,0x40,0x30,0x0F,0x00,0x00,0x3F,0x40,0x41,0x70,0x00}}};/*"统",5*/
  261. unsigned char code CHUSHI[8][2][16]=
  262. {{
  263. {0x00,0x08,0x88,0xC9,0x2E,0x98,0x48,0x00,0x08,0x08,0xF8,0x08,0x08,0xFC,0x08,0x00},
  264. {0x02,0x01,0x00,0x7F,0x01,0x02,0x44,0x20,0x10,0x0C,0x03,0x20,0x40,0x3F,0x00,0x00}},/*"初",0*/
  265. {{0x10,0x90,0x70,0x1F,0x12,0xF0,0x00,0x20,0x70,0x28,0x27,0x22,0x28,0x70,0x20,0x00},
  266. {0x40,0x21,0x12,0x0C,0x06,0x09,0x30,0x00,0x7F,0x21,0x21,0x21,0x21,0x7F,0x00,0x00}},/*"始",1*/
  267. {{0x80,0x40,0x20,0xF8,0x07,0x02,0x00,0x00,0xFF,0xC0,0x60,0x30,0x1C,0x08,0x00,0x00},
  268. {0x00,0x00,0x00,0x7F,0x00,0x04,0x02,0x01,0x3F,0x40,0x40,0x40,0x40,0x78,0x00,0x00}},/*"化",2*/
  269. {{0x00,0x00,0xFC,0x08,0x08,0x08,0x08,0xFF,0x08,0x08,0x08,0x08,0xFC,0x08,0x00,0x00},
  270. {0x00,0x00,0x07,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0x02,0x02,0x07,0x00,0x00,0x00}},/*"中",3*/
  271. {{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
  272. {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},/*" ",1*/
  273. {{0x40,0x42,0x4C,0xC4,0x00,0x22,0xAA,0xAA,0xAA,0xBF,0xAA,0xAA,0xAA,0x22,0x20,0x00},
  274. {0x00,0x00,0x00,0x7F,0x20,0x10,0xFF,0x0A,0x0A,0x0A,0x4A,0x8A,0x7F,0x00,0x00,0x00}},/*"请",2*/
  275. {{0x00,0x12,0x92,0x72,0xFF,0x51,0x81,0xF2,0x9C,0x90,0x9F,0x90,0x98,0xF4,0x02,0x00},
  276. {0x08,0x06,0x01,0x00,0xFF,0x00,0x00,0xFF,0x04,0x04,0x04,0x44,0x84,0x7F,0x00,0x00}},/*"稍",3*/
  277. {{0x40,0x20,0xF8,0x07,0xF2,0x08,0x0A,0xFA,0x4A,0xCA,0x4A,0x4E,0x4A,0x48,0x08,0x00},
  278. {0x00,0x00,0x7F,0x00,0x0F,0x42,0x23,0x12,0x0E,0x03,0x06,0x1A,0x32,0x62,0x22,0x00}}};/*"候",4*/

  279. /*********************************************************************/
  280. /*********************************************************************/
  281. typedef struct {
  282.                 char    hour;
  283.                 char    minute;
  284.                 char    second;
  285. } time;
  286. /*****************************/
  287. /*******************************/
  288. typedef struct {
  289.                 char    year;
  290.                 char    month;
  291.                 char    day;
  292. } date;
  293. /******************************/
  294. time now={00,00,00},display;
  295. int   Aminute;
  296. date today={17,04,22},tmpday;
  297. char        ABC ;
  298. char        ABCD;
  299. unsigned char gx,gy;


  300. void initFlag(void)
  301. {
  302.         P0 = 0xFF;                        // 输出端口初始化
  303.           P2 = 0xFF;                        // 输出端口初始化
  304.           P1 = 0xFF;                        // 输入端口初始化
  305.           P3 = 0xFF;                        // 输入端口初始化               
  306.     now.hour = 24;
  307.     now.minute =00;
  308.     now.second =00;
  309. }
  310. /**************************************************/
  311. /***************检测忙****************************/
  312. /************************************************/
  313. void check_GLCD_busyflag(void)
  314. {
  315.        unsigned char   x;
  316.         GLCD_R_W=1;
  317.         GLCD_D_I=0;
  318.         GLCD_ENABLE=1;
  319.         P2=0x00;
  320.         do
  321.                 {
  322.                 x=P2 && 128;
  323.         } while(x);
  324.                   GLCD_ENABLE=0;
  325.         GLCD_D_I=1;
  326.         GLCD_R_W=1;
  327. }
  328. /********************写命令**********************/
  329. void write_GLCD_command(unsigned command)
  330. {
  331.                         GLCD_R_W = 0;
  332.                  GLCD_D_I = 0;
  333.                 GLCD_ENABLE=1;
  334.                 P2=command;
  335.                 GLCD_ENABLE=0;
  336.                 GLCD_D_I=1;
  337.                 GLCD_R_W=1;
  338.                 check_GLCD_busyflag();   //检测忙
  339. }
  340. /********************写数据*********************/
  341. void write_GLCD_data(unsigned GLCDdata)
  342. {
  343.                           GLCD_R_W=0;
  344.                 GLCD_D_I=1;
  345.                 GLCD_ENABLE=1;
  346.                 P2=GLCDdata;
  347.                 GLCD_ENABLE=0;
  348.                 GLCD_D_I=0;
  349.                 GLCD_R_W=1;
  350.                 check_GLCD_busyflag(); //检测忙
  351. }
  352. /*********************清屏**********************/        
  353. void clear_GLCD()
  354. {
  355.         int     i,j;
  356.         GLCD_CS1=1;
  357.         GLCD_CS2=1;
  358.         write_GLCD_command(GLCD_ON);   
  359.         write_GLCD_command(GLCD_START_LINE_0);
  360.         for(i=0;i<8;i++)
  361.         {
  362.                 write_GLCD_command(SET_PAGE+i);
  363.                 write_GLCD_command(SET_Y_ADDRESS_0);   
  364.                 for(j=0;j<64;j++)
  365.                 write_GLCD_data(0);
  366.         }               
  367. }
  368. /*******************显示一个圆形****************/
  369. void show_pattern(unsigned char page,unsigned char y,unsigned char *pattern,unsigned char len)
  370. {
  371.         int i;
  372.         write_GLCD_command(SET_PAGE+page);      
  373.         write_GLCD_command(SET_Y_ADDRESS_0+y);  
  374.         for(i=0;i<len;i++)
  375.         {
  376.                 write_GLCD_data(*pattern);
  377.                 pattern++;
  378.         }
  379. }
  380. /*********************显示一个字****************/
  381. void display_GLCD_data(unsigned char *p)
  382. {                        
  383.           if (gx<64)
  384.                                 {
  385.                           GLCD_CS1=1;
  386.                           GLCD_CS2=0;
  387.                           show_pattern(gy,gx,p,8);
  388.                           show_pattern(gy,gx+8,p+8,8);
  389.                           show_pattern(gy+1,gx,p+16,8);
  390.                           show_pattern(gy+1,gx+8,p+24,8);
  391.                         }
  392.                 else
  393.                         {
  394.                           GLCD_CS1=0;
  395.                           GLCD_CS2=1;
  396.                           show_pattern(gy,gx-64,p,8);
  397.                           show_pattern(gy,gx-56,p+8,8);

  398.                           show_pattern(gy+1,gx-64,p+16,8);
  399.                           show_pattern(gy+1,gx-56,p+24,8);
  400.                         }
  401.         gx=gx+16;
  402. }
  403. void display_GLCD_string(unsigned char *p,int len)
  404. {
  405.          int i;
  406.                 for(i=0;i<len;i++)
  407.                 display_GLCD_data((p+32*i));
  408. }

  409. void display_GLCD_numberAB(char number)
  410. {
  411.         int x,y;
  412.         x=number/10;
  413.         y=number%10;
  414.         display_GLCD_data(*digit[x]);
  415.         display_GLCD_data(*digit[y]);
  416. }

  417. void display_GLCD_numberB(char number)
  418. {
  419.          unsigned int x,y,z,j;               
  420.         x=(number/1000)%10;
  421.         y=(number/100)%10;
  422.                 z=(number/10)%10;
  423.                 j=number%10;
  424.         display_GLCD_data(*digit[x]);
  425.         display_GLCD_data(*digit[y]);
  426.                 display_GLCD_data(*digit[z]);
  427.         display_GLCD_data(*digit[j]);
  428. }

  429. void gotoxy(unsigned x,unsigned y)
  430. {
  431.         gy=y;
  432.         gx=x;
  433. }

  434. void display_time(time dispaly_time)
  435. {
  436.         gotoxy(0,4);
  437.         display_GLCD_numberAB(dispaly_time.hour);
  438.         display_GLCD_data(comma);
  439.         display_GLCD_numberAB(dispaly_time.minute);
  440.         display_GLCD_data(comma);
  441.         display_GLCD_numberAB(dispaly_time.second);
  442. }

  443. void display_time1(int F)
  444. {
  445.         gotoxy(48,6);        
  446.              display_GLCD_numberB(F);  
  447. }

  448. /******************定时器0初始化*********************************************/
  449. void initTimer (void)
  450. {
  451.          timer0_tick=0;
  452.         EA=0;
  453.          TMOD=0x11;
  454.         TH0=-9460/256;
  455.         TL0=-9460%256;         //初始化计数器初值

  456.         PT0=1;
  457.         TR0=1;
  458.         ET0=1;
  459.          
  460.     EA =1;
  461. }
  462. /******************定时器0中断处理程序*********************************************/
  463. //用于时钟
  464. void timer0 (void) interrupt 1
  465. {         
  466.         TR0=0;
  467.     TH0=-9460/256;
  468.         TL0=-9460%256;         //初始化计数器初值        
  469.     TR0=1;
  470.     timer0_tick++;
  471.         if (timer0_tick==100)
  472.    {
  473.         timer0_tick=0;
  474.                 /***********************************************************/                        
  475.                 if(now.second==0)
  476.                            {
  477.                                            now.second=59;            
  478.                             if (now.minute==0)
  479.                                       {
  480.                                                now.minute=59;                     
  481.                                                         if (now.hour==0)
  482.                                                   {
  483.                                                                         now.hour = 24;
  484.                                                                 now.minute =00;
  485.                                                                 now.second =00;                                                                          
  486.                                                   }else now.hour--;
  487.                                        }else now.minute--;                     
  488.                            }else  now.second--;                                 
  489.                
  490.                 if(Aminute==10000)Aminute=0;
  491.                         else Aminute++;        
  492.                   
  493.   }            
  494. }


  495. /******************************************************************/
  496. /***********************主程序*************************************/
  497. /******************************************************************/
  498. void MAIN (void)
  499. {

  500.            unsigned int i,j;               
  501.         initFlag ();                                                        //端口初始化
  502.         clear_GLCD();                                                        //清屏
  503.              gotoxy(0,0);
  504.                  display_GLCD_string(QINGPIN,8);         //把不显示的位置显示空白
  505.                  gotoxy(0,2);
  506.                  display_GLCD_string(QINGPIN,8);
  507.                  gotoxy(0,4);
  508.                  display_GLCD_string(QINGPIN,8);
  509.                  gotoxy(0,6);
  510.                  display_GLCD_string(QINGPIN,8);                                                  

  511.                  gotoxy(32,0);                                                   //设光标
  512.             display_GLCD_string(HUANYIN,4);         //显示"欢迎使用"字符串
  513.               gotoxy(16,2);                                                   //设光标
  514.               display_GLCD_string(HENFENG,6);            //显示"控制系统"字符串
  515.               gotoxy(0,4);                                                   //设光标
  516.               display_GLCD_string(CHUSHI,8);                    //显示"初始化"字符串
  517.                     
  518.                 for (i=0;i<1000;i++)                                //延时
  519.                 for(j=0;j<200;j++);                                 
  520.                 initTimer();                                                 //开中断
  521.                 WDTRST=0x1E;                                           //打开看门狗
  522.             WDTRST=0xE1;
  523.         while(1)                                       
  524.                 {                                       
  525.                                                                 WDTRST=0x1E;                                           //打开看门狗
  526.                                                             WDTRST=0xE1;
  527.                                                                 gotoxy(0,0);                                                        //设光标
  528.                                                            display_GLCD_string(CHUWU,4);                     //显示"严重错误"字符串
  529.                                                                 gotoxy(64,0);
  530.                                                                 display_GLCD_string(XIA,4);
  531.         
  532.                                                                  gotoxy(0,2);                                                        //设光标
  533.                                                            display_GLCD_string(GUOLI,4);                         //显示"过滤时间"字符串
  534.                                                                   gotoxy(64,2);
  535.                                                         display_GLCD_numberAB(ABCD);                         //显示00数字
  536.                                                                  gotoxy(96,2);                                                        //设光标
  537.                                                            display_GLCD_string(XIAOSHI,2);                 //显示"小时"字符串

  538.                                                                  display_time(now);                                                 //显示到计时时间
  539.                                                                         
  540.                                                           gotoxy(0,6);                                                        //设光标
  541.                                                      display_GLCD_string(QINGXIE,2);                        //显示"清洗:"字符串
  542.                                                                 display_GLCD_string(comma,1);                        //显示":"字符串                                         
  543.                                                                  display_time1(Aminute);                         // 显示电机运行时间
  544.                                                                  gotoxy(112,6);                                                        //设光标
  545.                                                      display_GLCD_string(MIAO,1);                        //显示"秒"字符串

  546.                                                                 WDTRST=0x1E;                                                //喂狗
  547.                                                             WDTRST=0xE1;
  548.                 }                                                                                                                                   
  549. }  
  550. /*********************************************************************/
  551. /*******************END MAIN******************************************/
  552. /*********************************************************************/
复制代码


51单片机控制12864液晶显示 仿真.rar

244.87 KB, 下载次数: 53, 下载积分: 黑币 -5

评分

参与人数 2黑币 +35 收起 理由
absflash + 5 xx谢谢,正好在玩12864
admin + 30 共享资料的积分奖励!

查看全部评分

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 顶 踩
回复

使用道具 举报

沙发
ID:89938 发表于 2018-8-23 21:58 | 只看该作者
高大商,很厉害
回复

使用道具 举报

板凳
ID:243394 发表于 2018-8-27 13:11 | 只看该作者
东西不错,谢谢分享
回复

使用道具 举报

地板
ID:442022 发表于 2018-12-21 16:29 | 只看该作者
感谢,我收藏了
回复

使用道具 举报

5#
ID:432653 发表于 2020-5-22 21:04 | 只看该作者
仿真没显示,睡着一般
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表