📄 display.lst
字号:
C51 COMPILER V8.02 DISPLAY 04/10/2008 10:43:45 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE DISPLAY
OBJECT MODULE PLACED IN .\xiazai\display.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE daima\display.c BROWSE DEBUG OBJECTEXTEND PRINT(.\display.lst) OBJECT(.\xia
-zai\display.obj)
line level source
1 #include"reg51.h"
2 #define zimushuru 0
3 #define pinyinchazhao 1
4 #define hazixianshi 2
5 #define xunhuan_xianshi 3
6 #define write_to_eprom 4
7 #define read_of_eprom 5
8 #define yiwei_xianshi 6
9
10 void move(unsigned char un);
11 void display(void);
12
13 sbit A1=P1^0;
14 sbit B1=P1^1;
15 sbit C1=P1^2;
16 sbit D1=P1^3;
17 sbit OE=P3^5; //138的使能
18
19 sbit CLK=P3^2;
20 sbit CS=P3^3;
21 sbit Data=P2^5;
22
23 bdata unsigned char zimo;
24 sbit zimo0=zimo^0;
25 sbit zimo1=zimo^1;
26 sbit zimo2=zimo^2;
27 sbit zimo3=zimo^3;
28 sbit zimo4=zimo^4;
29 sbit zimo5=zimo^5;
30 sbit zimo6=zimo^6;
31 sbit zimo7=zimo^7;
32
33 bdata unsigned char hang_138=0;
34 sbit hang0=hang_138^0;
35 sbit hang1=hang_138^1;
36 sbit hang2=hang_138^2;
37 sbit hang3=hang_138^3;
38
39
40
41 extern unsigned char xdata zimoku[3][128]={0x00, 0x80, 0x00, 0x80, 0xfc, 0x80, 0x05, 0xfe, 0x85, 0x04, 0x4
-a, 0x48, 0x28, 0x40, 0x10, 0x40,
42 0x18, 0x40, 0x18, 0x60, 0x24, 0xa0, 0x24, 0x90, 0x41, 0x18, 0x86, 0x0e, 0x38, 0x04, 0x00, 0x00,0x10, 0x00,
- 0x11, 0xfc, 0x11, 0x04, 0x7d, 0x04, 0x55, 0xfc, 0x54, 0x20, 0x55, 0xfc, 0x55, 0x24,
43 0x7d, 0xfc, 0x11, 0x24, 0x19, 0x24, 0x15, 0xfc, 0x1e, 0x22, 0xe4, 0x22, 0x00, 0x1e, 0x00, 0x00 , };
44 extern unsigned char zishu;
45 extern unsigned char page;
46 extern unsigned char zhuangtai;
47 extern unsigned char hz_dis_geshu[3];
48 unsigned char movei=0;
49
50
51 void move(bit un)
52 {
C51 COMPILER V8.02 DISPLAY 04/10/2008 10:43:45 PAGE 2
53 1 CLK=0;
54 1 Data=~un;
55 1 CLK=1;
56 1 A1=~A1;
57 1 }
58 /*void send_595_byte(unsigned char da)
59 {
60 zimo=da;
61 move(zimo7);
62 move(zimo6);
63 move(zimo5);
64 move(zimo4);
65 move(zimo3);
66 move(zimo2);
67 move(zimo1);
68 move(zimo0);
69
70 }*/
71 void send_595_bit(unsigned char sendi,bit da)
72 {
73 1 if(movei<=sendi)
74 1 move(da);
75 1 }
76
77 void send_595_bit0(unsigned char sendi,bit da)
78 {
79 1 if(movei>sendi)
80 1 move(da);
81 1
82 1 }
83 void display(void)
84 {
85 1 unsigned char i=0,j=0;
86 1 static unsigned char yanshi=0;
87 1 CS=0;
88 1 OE=1;
89 1 /* for(j=0;j<4;j++)
90 1 {
91 1 send_595_byte(zimoku[page][j*32+hang_138*2]);
92 1 send_595_byte(zimoku[page][j*32+hang_138*2+1]);
93 1
94 1 } */
95 1 zimo=zimoku[page][hang_138*2];
96 1 send_595_bit(0,zimo7);
97 1 send_595_bit(1,zimo6);
98 1 send_595_bit(2,zimo5);
99 1 send_595_bit(3,zimo4);
100 1 send_595_bit(4,zimo3);
101 1 send_595_bit(5,zimo2);
102 1 send_595_bit(6,zimo1);
103 1 send_595_bit(7,zimo0);
104 1 zimo=zimoku[page][hang_138*2+1];
105 1 send_595_bit(8,zimo7);
106 1 send_595_bit(9,zimo6);
107 1 send_595_bit(10,zimo5);
108 1 send_595_bit(11,zimo4);
109 1 send_595_bit(12,zimo3);
110 1 send_595_bit(13,zimo2);
111 1 send_595_bit(14,zimo1);
112 1 send_595_bit(15,zimo0);
113 1
114 1
C51 COMPILER V8.02 DISPLAY 04/10/2008 10:43:45 PAGE 3
115 1
116 1 zimo=zimoku[page][32+hang_138*2];
117 1 send_595_bit(16,zimo7);
118 1 send_595_bit(17,zimo6);
119 1 send_595_bit(18,zimo5);
120 1 send_595_bit(19,zimo4);
121 1 send_595_bit(20,zimo3);
122 1 send_595_bit(21,zimo2);
123 1 send_595_bit(22,zimo1);
124 1 send_595_bit(23,zimo0);
125 1 zimo=zimoku[page][32+hang_138*2+1];
126 1 send_595_bit(24,zimo7);
127 1 send_595_bit(25,zimo6);
128 1 send_595_bit(26,zimo5);
129 1 send_595_bit(27,zimo4);
130 1 send_595_bit(28,zimo3);
131 1 send_595_bit(29,zimo2);
132 1 send_595_bit(30,zimo1);
133 1 send_595_bit(31,zimo0);
134 1
135 1
136 1 zimo=zimoku[page][64+hang_138*2];
137 1 send_595_bit(32,zimo7);
138 1 send_595_bit(33,zimo6);
139 1 send_595_bit(34,zimo5);
140 1 send_595_bit(35,zimo4);
141 1 send_595_bit(36,zimo3);
142 1 send_595_bit(37,zimo2);
143 1 send_595_bit(38,zimo1);
144 1 send_595_bit(39,zimo0);
145 1 zimo=zimoku[page][64+hang_138*2+1];
146 1 send_595_bit(40,zimo7);
147 1 send_595_bit(41,zimo6);
148 1 send_595_bit(42,zimo5);
149 1 send_595_bit(43,zimo4);
150 1 send_595_bit(44,zimo3);
151 1 send_595_bit(45,zimo2);
152 1 send_595_bit(46,zimo1);
153 1 send_595_bit(47,zimo0);
154 1
155 1 zimo=zimoku[page][96+hang_138*2];
156 1 send_595_bit(48,zimo7);
157 1 send_595_bit(49,zimo6);
158 1 send_595_bit(50,zimo5);
159 1 send_595_bit(51,zimo4);
160 1 send_595_bit(52,zimo3);
161 1 send_595_bit(53,zimo2);
162 1 send_595_bit(54,zimo1);
163 1 send_595_bit(55,zimo0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -