?? lcd.lst
字號(hào):
C51 COMPILER V6.23a LCD 08/20/2002 17:07:42 PAGE 1
C51 COMPILER V6.23a, COMPILATION OF MODULE LCD
OBJECT MODULE PLACED IN Lcd.OBJ
COMPILER INVOKED BY: C:\KEIL\C51\BIN\C51.EXE Lcd.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 /******** LCD driver controller: LC75853N(SANYO)*********/
2
3 #include "global.h"
4 #include "util.h"
5 #include "lcd.h"
6
7
8 #define SET_LCD_DOUT LCD_DOUT = 1;
9 #define CLEAR_LCD_DOUT LCD_DOUT = 0;
10 #define SET_LCD_CLK LCD_CLK = 1;
11 #define CLEAR_LCD_CLK LCD_CLK = 0;
12 #define SET_LCD_DATA LCD_DATA = 1;
13 #define CLEAR_LCD_DATA LCD_DATA = 0;
14 #define SET_LCD_STROBE LCD_STROBE = 1;
15 #define CLEAR_LCD_STROBE LCD_STROBE = 0;
16
17
18 unsigned char idata KeyData = 0;
19
20 unsigned char idata LCD_min_H;
21 unsigned char idata LCD_min_L;
22 unsigned char idata LCD_sec_H;
23 unsigned char idata LCD_sec_L;
24 unsigned char idata LCD_seg_8;
25
26
27 unsigned char Old_key = 0;
28 extern bit bdata memory_flash;
29
30 extern bit bdata STEREO_FLAG;
31 extern unsigned char idata volume_level;
32 extern unsigned char idata _timer0;
33 extern unsigned char timer2;
34 extern unsigned char Chanel;
35 extern unsigned long Display_Char;
36
37
38 /* 7 */ /* c1 c2 c3 c4 */
39 unsigned int code turn_char[] ={0x1A00,0x3800,0x3200,0x2A00};
40 unsigned int code Band_cha_H[] ={0x1F40,0x1A40}; /* NO.1 */
41 unsigned int code Band_cha_L[] ={0x0018,0x0018}; /* NO.2 */
42 unsigned int code Col2_char[] ={0,0x0020}; /* NO.5 */
43
44 /* NO.2 */ /*1
-0 M N E V*/
45 unsigned int code seg4_char[] ={0x0FC0,0x0C00,0x2B40,0x2F00,0x2C80,0x2780,0x27C0,0x0D00,0x2FC0,0x2F80,0x0
-000,0x8DC0,0x5CC0,0x23C0,0x5C00};
46
47 /* NO.5 */ /*1
-0 D Y P T */
48 unsigned int code seg8_char[] ={0x0FC0,0x0C00,0x2B40,0x2F00,0x2C80,0x2780,0x27C0,0x0D00,0x2FC0,0x2F80,0x0
-000,0x5F00,0x2E80,0x29C0,0x5100};
49
50 /* NO.3 */ /*1
-0 L P E J U */
C51 COMPILER V6.23a LCD 08/20/2002 17:07:42 PAGE 2
51 unsigned int code seg5_char[] ={0x03F0,0x0300,0x0AD0,0x0BC0,0x0B20,0x09E0,0x09F0,0x0340,0x0BF0,0x0BE0,0x0
-000,0x00B0,0x0A70,0x08F0,0x03D0,0x03B0};
52
53 /* NO.3 */ /
-*10 L M D E T */
54 unsigned int code seg6_char_H[] ={0xE000,0x0000,0xA000,0x8000,0x4000,0xC000,0xE000,0x8000,0xE000,0xC000,0
-x0000,0x6000,0xE000,0x8000,0xE000,0x8000};
55
56 /* NO.4 */ /
-*10 L M D E T */
57 unsigned int code seg6_char_L[] ={0x001C,0x0018,0x0054,0x005C,0x0058,0x004C,0x004C,0x0018,0x005C,0x005C,0
-x0000,0x0004,0x00B8,0x00BC,0x0044,0x00A0};
58
59 /* NO.4*/ /*1
-0 A C E*/
60 unsigned int code seg7_char[] ={0x3F00,0x3000,0xAD00,0xBC00,0xB200,0x9E00,0x9F00,0x3400,0xBF00,0xBE00,0x0
-000,0xB700,0x0F00,0x8F00};
61
62
63 /* NO.6 */
64 unsigned int code seg9_char[] ={0x03F0,0x0300,0x0AD0,0x0BC0,0x0BA0,0x09E0,0x09F0,0x0340,0x0BF0,0x0BE0,0x0
-000};
65
66 /* NO.6 */
67 unsigned int code seg10_char_H[] ={0xE000,0x0000,0xA000,0x8000,0x4000,0xC000,0xE000,0x8000,0xE000,0xC000,
-0x0000};
68
69 /* NO.7 */
70 unsigned int code seg10_char_L[] ={0x001C,0x0018,0x0054,0x005C,0x0058,0x004C,0x004C,0x0018,0x005C,0x005C,
-0x0000};
71
72
73 /* NO.8 */
74 unsigned int code vol_disp_char_H[] ={0x0004,0x0024,0x0124,0x0924,0x4924};
75
76 /* NO.9 */
77 unsigned int code vol_disp_char_L[] ={0x0008,0x0048,0x0248};
78
79
80 /* NO.7 */
81 unsigned int code vol_L_indicator_H[] ={0x4000};
82
83 /* NO.8 */
84 unsigned int code vol_L_indicator_M[] ={0x0008,0x0048,0x0248,0x1248,0x9248};
85
86 /* NO.9 */
87 unsigned int code vol_L_indicator_L[] ={0x0010,0x0090};
88
89 /* NO.7 */
90 unsigned int code vol_R_indicator_H[] ={0x8000};
91
92 /* NO.8 */
93 unsigned int code vol_R_indicator_M[] ={0x0010,0x0090,0x0490,0x2490};
94
95 /* NO.9 */
96 unsigned int code vol_R_indicator_L[] ={0x0020,0x0120};
97
98
99
100 #define ICON_in 0x0400 /* seven */
101 #define ICON_clsc 0x0004 /* one */
102 #define ICON_pop 0x0008 /* one */
C51 COMPILER V6.23a LCD 08/20/2002 17:07:42 PAGE 3
103 #define ICON_rock 0x0010 /* one */
104 #define ICON_double_loop 0x0004 /* three */
105 #define ICON_st 0x0004 /* two */
106 #define ICON_loc 0x0020 /* two */
107 #define ICON_disc_UP 0x0008 /* six */
108 #define ICON_lou 0x0008 /* three */
109 #define ICON_scn 0x1000 /* six */
110 #define ICON_disc_DN 0x0004 /* six */
111 #define ICON_rpt 0x0100 /* seven */
112 #define ICON_rdm 0x0400 /* six */
113 #define ICON_swf 0x0008 /* five */
114 #define ICON_track 0x0020 /* seven */
115 #define ICON_CH 0x0080 /* seven */
116
117
118
119 void updateLCDtime(void)
120 {
121 1 unsigned int temp;
122 1 unsigned char LCD_temp;
123 1 LCD_temp = 0;
124 1
125 1 if(Band==FM_IN){
126 2 LCD_min_H = 0;
127 2 LCD_min_L = 0;
128 2 LCD_sec_H = 0;
129 2 LCD_sec_L = 0;
130 2 if(Divisor > 99999){
131 3 LCD_min_H = Divisor/100000;
132 3 temp = Divisor%100000;
133 3 LCD_min_L = temp/10000;
134 3 temp = temp%10000;
135 3 LCD_sec_H = temp/1000;
136 3 temp = temp%1000;
137 3 LCD_sec_L = temp/100;
138 3 if(temp%100 == 50){
139 4 LCD_seg_8 = 5;
140 4 } else {
141 4 LCD_seg_8 = 10; /*0x0000*/
142 4 }
143 3 } else {
144 3 LCD_min_H = 10;
145 3 LCD_min_L = Divisor/10000;
146 3 temp = Divisor%10000;
147 3 LCD_sec_H = temp/1000;
148 3 temp = temp%1000;
149 3 LCD_sec_L = temp/100;
150 3 if(temp%100 == 50){
151 4 LCD_seg_8 = 5;
152 4 } else {
153 4 LCD_seg_8 = 10; /*0x0000*/
154 4 }
155 3 }
156 2 }else{
157 2 LCD_min_H = 0;
158 2 LCD_min_L = 0;
159 2 LCD_sec_H = 0;
160 2 LCD_sec_L = 0;
161 2 LCD_seg_8 = 10;
162 2 if(Divisor > 999){
163 3 LCD_min_H = Divisor/1000;
164 3 temp = Divisor%1000;
C51 COMPILER V6.23a LCD 08/20/2002 17:07:42 PAGE 4
165 3 LCD_min_L = temp/100;
166 3 temp = temp%100;
167 3 LCD_sec_H = temp/10;
168 3 temp = temp%10;
169 3 LCD_sec_L = temp;
170 3 } else {
171 3 LCD_min_H = 10;
172 3 LCD_min_L = Divisor/100;
173 3 temp = Divisor%100;
174 3 LCD_sec_H = temp/10;
175 3 temp = temp%10;
176 3 LCD_sec_L = temp;
177 3 }
178 2 }
179 1
180 1 CLEAR_LCD_STROBE; /* CE */
181 1 LCD_objectSendByte1(0x42); /* Address */
182 1 SET_LCD_STROBE; /* CE */
183 1
184 1 LCD_objectSendByte4(Band_cha_H[Band]);
185 1 LCD_objectSendByte4(Band_cha_L[Band] | seg4_char[LCD_min_H]); /*7seg4_cha
-r[Min_H]*/
186 1 LCD_objectSendByte4(seg5_char[LCD_min_L] | seg6_char_H[LCD_sec_H]); /*LCD_sec_H*/
187 1 LCD_objectSendByte4(0);
188 1 CLEAR_LCD_STROBE;
189 1
190 1 LCD_objectSendByte1(0x42); /* Address */
191 1 SET_LCD_STROBE; /* CE */
192 1
193 1 LCD_objectSendByte4(seg6_char_L[LCD_sec_H] | seg7_char[LCD_sec_L]); /*Sec_H_L
-| Sec_L*/
194 1 LCD_objectSendByte4(Col2_char[Band] | seg8_char[LCD_seg_8]);
195 1 LCD_objectSendByte4(0);
196 1 LCD_objectSendByte4(0x8000);
197 1 CLEAR_LCD_STROBE;
198 1
199 1 LCD_objectSendByte1(0x42); /* Address */
200 1 SET_LCD_STROBE; /* CE */
201 1
202 1 LCD_objectSendByte4(0);
203 1 LCD_objectSendByte4(0);
204 1 LCD_objectSendByte4(0);
205 1 LCD_objectSendByte4(0x4000);
206 1 CLEAR_LCD_STROBE;
207 1 CLEAR_LCD_DATA;
208 1
209 1 }
210
211
212 void LCD_state_init(void)
213 {
214 1
215 1 SET_LCD_DOUT; /* DO */
216 1 CLEAR_LCD_STROBE; /* CE */
217 1 CLEAR_LCD_DATA; /* DI */
218 1 SET_LCD_CLK; /* CLK */
219 1
220 1
221 1 CLEAR_LCD_STROBE; /* CE */
222 1 LCD_objectSendByte1(0x42); /* Address */
223 1 SET_LCD_STROBE; /* CE */
224 1
C51 COMPILER V6.23a LCD 08/20/2002 17:07:42 PAGE 5
225 1 LCD_objectSendByte4(0);
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -