📄 mima.lst
字号:
C51 COMPILER V7.06 MIMA 07/10/2008 00:20:02 PAGE 1
C51 COMPILER V7.06, COMPILATION OF MODULE MIMA
OBJECT MODULE PLACED IN mima.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE mima.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include<at89x51.h>
2 #include<intrins.h>
3 #define uchar unsigned char
4 #define uint unsigned int
5 sbit EN=P2^0;
6 sbit RW=P2^1; //液晶读写控制引脚
7 sbit RS=P2^2;
8 sbit CS1=P2^3;
9 sbit CS2=P2^4;
10 bit rightflag; //密码正确标志
11 bit set; //设置密码状态标志
12 #define datport P0 //液晶数据口
13 uchar num=12;
14 uchar count=-1;
15 uchar pws[6]={3,6,2,3,3,1}; //原始密码为362330
16 uchar pwx[6]; //按下数字存储区
17 void shulu();
18 uchar code table[]={ //取模方式为从左到右,从上到下,纵向8点下高位 16X16
19
20 /*请 0 CC7EB */
21 0x40,0x42,0x4C,0xC4,0x00,0x22,0xAA,0xAA,0xAA,0xBF,0xAA,0xAA,0xAA,0x22,0x20,0x00,
22 0x00,0x00,0x00,0x7F,0x20,0x10,0xFF,0x0A,0x0A,0x0A,0x4A,0x8A,0x7F,0x00,0x00,0x00,
23
24 /*输 1 CCAE4 */
25 0x44,0xF4,0x4F,0xE4,0x44,0x64,0x90,0x98,0x94,0x93,0x14,0x98,0x08,0xD0,0x10,0x00,
26 0x04,0x04,0x04,0xFF,0x02,0x02,0xFF,0x4A,0x8A,0x7F,0x00,0x3F,0x80,0xFF,0x00,0x00,
27
28 /*入 2 CC8EB */
29 0x00,0x00,0x00,0x00,0x01,0x83,0x76,0x18,0x60,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
30 0x40,0x20,0x10,0x08,0x06,0x01,0x00,0x00,0x00,0x00,0x03,0x04,0x18,0x30,0x10,0x00,
31
32 /*密 3 CC3DC */
33 0x00,0x58,0x24,0x04,0xF4,0x04,0x8D,0xB6,0x44,0x34,0xCC,0x94,0x24,0xCC,0x04,0x00,
34 0x02,0x06,0x02,0x79,0x41,0x41,0x41,0x7D,0x41,0x41,0x41,0x40,0x78,0x00,0x00,0x00,
35
36 /*码 4 CC2EB */
37 0x02,0x82,0xE2,0x5E,0x42,0xC2,0x00,0x02,0xFA,0x82,0x82,0x82,0xFE,0x80,0x00,0x00,
38 0x01,0x00,0x7F,0x10,0x10,0x3F,0x00,0x04,0x04,0x04,0x44,0x84,0x40,0x3F,0x00,0x00,
39
40 /*正 5 CD5FD */
41 0x00,0x02,0x02,0xC2,0x02,0x02,0x02,0x02,0xFE,0x82,0x82,0x82,0x82,0x82,0x02,0x00,
42 0x20,0x20,0x20,0x3F,0x20,0x20,0x20,0x20,0x3F,0x20,0x20,0x20,0x20,0x20,0x20,0x00,
43
44 /*确 6 CC8B7 */
45 0x00,0x84,0xE4,0x5C,0x44,0xC4,0x10,0xF8,0x97,0x92,0xF2,0x9A,0x96,0xF2,0x00,0x00,
46 0x01,0x00,0x3F,0x08,0x88,0x4F,0x30,0x0F,0x04,0x04,0x3F,0x44,0x84,0x7F,0x00,0x00,
47
48 /*谢 7 CD0BB */
49 0x40,0x42,0xCC,0x04,0x00,0xFC,0x56,0x55,0xFC,0x50,0x90,0x10,0xFF,0x10,0x10,0x00,
50 0x00,0x00,0x3F,0x50,0x29,0x11,0x4D,0x83,0x7F,0x00,0x41,0x80,0x7F,0x00,0x00,0x00,
51
52 /*合 8 CBACF */
53 0x40,0x40,0x20,0x50,0x48,0x44,0x42,0x41,0x42,0x44,0x68,0x50,0x30,0x60,0x20,0x00,
54 0x00,0x00,0x00,0x7E,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x7E,0x00,0x00,0x00,0x00,
55
C51 COMPILER V7.06 MIMA 07/10/2008 00:20:02 PAGE 2
56 /*作 9 CD7F7 */
57 0x80,0x40,0x20,0xF8,0x07,0x22,0x18,0x0C,0xFB,0x48,0x48,0x48,0x68,0x48,0x08,0x00,
58 0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0xFF,0x04,0x04,0x04,0x04,0x06,0x04,0x00,
59
60 /*错 10 CB4ED */
61 0x40,0x30,0x2C,0xE7,0x24,0x24,0x40,0x48,0x7F,0x48,0x48,0x7F,0x48,0x48,0x40,0x00,
62 0x01,0x01,0x01,0xFF,0x41,0x21,0x00,0xFF,0x49,0x49,0x49,0x49,0x49,0xFF,0x00,0x00,
63
64 /*误 11 CCEF3 */
65 0x40,0x41,0xCE,0x04,0x00,0x40,0x5F,0x51,0x51,0xD1,0x51,0x51,0x5F,0x40,0x00,0x00,
66 0x00,0x00,0x3F,0x10,0x88,0x42,0x22,0x12,0x0A,0x07,0x0A,0x12,0x22,0xE2,0x42,0x00,
67
68 /*重 12 CD6D8 */
69 0x08,0x08,0x0A,0xEA,0xAA,0xAA,0xAA,0xFF,0xA9,0xA9,0xA9,0xE9,0x08,0x08,0x08,0x00,
70 0x40,0x40,0x48,0x4B,0x4A,0x4A,0x4A,0x7F,0x4A,0x4A,0x4A,0x4B,0x48,0x40,0x40,0x00,
71
72 /*新 13 CD0C2 */
73 0x20,0x24,0x2C,0x35,0xE6,0x34,0x2C,0x24,0x00,0xFC,0x24,0x24,0xE2,0x22,0x22,0x00,
74 0x21,0x11,0x4D,0x81,0x7F,0x05,0x59,0x21,0x18,0x07,0x00,0x00,0xFF,0x00,0x00,0x00,
75
76 /*原 14 CD4AD */
77 0x00,0x00,0xFE,0x02,0x02,0xF2,0x52,0x5E,0x56,0x52,0x52,0xF2,0x02,0x02,0x00,0x00,
78 0xC0,0x30,0x0F,0x40,0x20,0x1B,0x52,0x82,0x7E,0x02,0x0A,0x13,0x70,0x20,0x00,0x00,
79
80 /*始 15 CCABC */
81 0x10,0x90,0x70,0x1F,0x12,0xF0,0x00,0x20,0x70,0x28,0x27,0x22,0x28,0x70,0x20,0x00,
82 0x40,0x21,0x12,0x0C,0x06,0x09,0x30,0x00,0x7F,0x21,0x21,0x21,0x21,0x7F,0x00,0x00,
83
84 /*设 16 CC9E8 */
85 0x40,0x41,0xCE,0x04,0x00,0x80,0x40,0xBE,0x82,0x82,0x82,0xBE,0xC0,0x40,0x40,0x00,
86 0x00,0x00,0x7F,0x20,0x90,0x80,0x40,0x43,0x2C,0x10,0x10,0x2C,0x43,0xC0,0x40,0x00,
87
88 /*置 17 CD6C3 */
89 0x00,0x20,0x2F,0xA9,0xA9,0xAF,0xE9,0xB9,0xA9,0xAF,0xA9,0xA9,0x2F,0x20,0x00,0x00,
90 0x80,0x80,0x80,0xFF,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xAA,0xFF,0x80,0x80,0x80,0x00,
91
92 /*成 18 CB3C9 */
93 0x00,0x00,0xF8,0x48,0x48,0x48,0xC8,0x08,0xFF,0x08,0x09,0x0A,0xC8,0x88,0x08,0x00,
94 0x40,0x30,0x0F,0x00,0x08,0x50,0x4F,0x20,0x10,0x0B,0x0C,0x12,0x21,0x40,0xF0,0x00,
95
96 /*功 19 CB9A6 */
97 0x00,0x04,0x04,0x04,0xFC,0x04,0x14,0x14,0x10,0x90,0x7F,0x10,0x10,0xF0,0x00,0x00,
98 0x04,0x0C,0x04,0x04,0x03,0x42,0x22,0x11,0x0C,0x23,0x20,0x60,0x20,0x1F,0x00,0x00,
99
100 /*您 20 CC4FA */
101 0x80,0x40,0x30,0xFC,0x03,0x90,0x68,0x06,0x04,0xF4,0x04,0x24,0x44,0x8C,0x04,0x00,
102 0x00,0x20,0x38,0x03,0x38,0x40,0x40,0x49,0x52,0x41,0x40,0x70,0x00,0x09,0x30,0x00,
103
104 /*的 21 CB5C4 */
105 0x00,0xF8,0x8C,0x8B,0x88,0xF8,0x40,0x30,0x8F,0x08,0x08,0x08,0x08,0xF8,0x00,0x00,
106 0x00,0x7F,0x10,0x10,0x10,0x3F,0x00,0x00,0x00,0x03,0x26,0x40,0x20,0x1F,0x00,0x00,
107
108 /*有 22 CD3D0 */
109 0x00,0x04,0x84,0x44,0xE4,0x34,0x2C,0x27,0x24,0x24,0x24,0xE4,0x04,0x04,0x04,0x00,
110 0x02,0x01,0x00,0x00,0xFF,0x09,0x09,0x09,0x29,0x49,0xC9,0x7F,0x00,0x00,0x00,0x00,
111
112 /*按 23 CB0B4 */
113 0x10,0x10,0x10,0xFF,0x90,0x50,0x98,0x88,0x88,0xE9,0x8E,0x88,0x88,0x98,0x88,0x00,
114 0x02,0x42,0x81,0x7F,0x00,0x40,0x40,0x26,0x25,0x18,0x08,0x16,0x31,0x60,0x20,0x00,
115
116 /*键 24 CBCFC */
117 0x40,0x30,0xEF,0x28,0x28,0x44,0x64,0xDC,0x10,0x54,0xFF,0x54,0x54,0x7C,0x10,0x00,
C51 COMPILER V7.06 MIMA 07/10/2008 00:20:02 PAGE 3
118 0x01,0x01,0x7F,0x21,0x51,0x22,0x14,0x0F,0x14,0x25,0x3F,0x45,0x45,0x45,0x44,0x00,
119
120 /*六 25 CC1F9 */
121 0x10,0x10,0x10,0x10,0x10,0x91,0x12,0x1E,0x94,0x10,0x10,0x10,0x10,0x10,0x10,0x00,
122 0x00,0x40,0x20,0x10,0x0C,0x03,0x01,0x00,0x00,0x01,0x02,0x0C,0x78,0x30,0x00,0x00,
123
124 /*位 26 CCEBB */
125 0x00,0xC0,0x30,0xEC,0x03,0x2A,0xC8,0x09,0x0A,0x0E,0x08,0xE8,0x48,0x08,0x00,0x00,
126 0x01,0x00,0x00,0x7F,0x20,0x20,0x20,0x27,0x20,0x30,0x2E,0x21,0x20,0x20,0x20,0x00
127
128 };
129 uchar code tablehf[]={ //16X8
130 0x80,0xA0,0xE0,0xC0,0xC0,0xE0,0xA0,0x80,0x00,0x02,0x03,0x01,0x01,0x03,0x02,0x00, // -*-
131 0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x00,0x00,0x00, // -:-
132 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x1E,0x0E,0x00,0x00,0x00, // -,-
133 0x00,0x00,0x38,0xFC,0xFC,0x38,0x00,0x00,0x00,0x00,0x00,0x0D,0x0D,0x00,0x00,0x00, // -!-
134 };
135 void delay(uint z) //延时
136 {
137 1 uint y;
138 1 for(;z>0;z--)
139 1 for(y=120;y>0;y--);
140 1 }
141 void CheckState() //检测液晶是否忙
142 {
143 1 uchar dat;
144 1 RS=0; //命令
145 1 RW=0; //写
146 1 do
147 1 {
148 2 datport=0x00;
149 2 EN=1;
150 2 dat=datport; //EN为下降时数据送入
151 2 EN=0;
152 2 dat=0x80&dat;
153 2 }
154 1 while(!(dat==0x00));
155 1 }
156 void SendCommond(uchar commond)
157 {
158 1 CheckState();
159 1 RS=0;
160 1 RW=0;
161 1 EN=1;
162 1 datport=commond;
163 1 EN=0;
164 1 }
165 void SetLine(uchar page) //设置行
166 {
167 1 page=0xb8|page;
168 1 SendCommond(page);
169 1 }
170 void SetStartLine(uchar startline) //设置起始行
171 {
172 1 startline=0xc0|startline;
173 1 SendCommond(startline);
174 1 }
175 void SetColumn(uchar column) //设置列
176 {
177 1 column=0x3f&column;
178 1 column=0x40|column;
179 1 SendCommond(column);
C51 COMPILER V7.06 MIMA 07/10/2008 00:20:02 PAGE 4
180 1 }
181 void WriteByte(uchar dat)
182 {
183 1 RS=1; //数据
184 1 RW=0; //写
185 1 EN=1;
186 1 datport=dat;
187 1 EN=0;
188 1 }
189 void SelectScreen(uchar screen)
190 {
191 1 switch(screen)
192 1 {
193 2 case 0: //全屏
194 2 {
195 3 CS1=0;_nop_();_nop_();_nop_();
196 3 CS2=0;_nop_();_nop_();_nop_();
197 3 } break;
198 2 case 1: //左边屏
199 2 {
200 3 CS1=0;_nop_();_nop_();_nop_();
201 3 CS2=1;_nop_();_nop_();_nop_();
202 3 } break;
203 2 case 2: //右边屏
204 2 {
205 3 CS1=1;_nop_();_nop_();_nop_();
206 3 CS2=0;_nop_();_nop_();_nop_();
207 3 } break;
208 2 }
209 1 }
210 void ClearScreen(uchar screen)
211 {
212 1 uchar i,j;
213 1 SelectScreen(screen);
214 1 for(i=0;i<8;i++)
215 1 {
216 2 SetLine(i);
217 2 SetColumn(0);
218 2 for(j=0;j<64;j++)
219 2 {
220 3 WriteByte(0x00); //每写一个数据,列自动加1
221 3 }
222 2 }
223 1 }
224 void Init()
225 {
226 1 CheckState();
227 1 SelectScreen(0);
228 1 SendCommond(0x3e); //关液晶显示
229 1 SelectScreen(0);
230 1 SendCommond(0x3f); //开液晶显示
231 1 SelectScreen(0);
232 1 ClearScreen(0);
233 1 SetStartLine(0);
234 1 }
235 void Display(uchar sr,uchar page,uchar column,uchar num) //显示16X16汉字,SR为选择屏(左边还是右边屏),NUM为
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -