📄 hg1926419c.lst
字号:
236 1 _nop_();
237 1 _nop_();
238 1 E=1;
239 1 _nop_();
240 1 _nop_();
241 1 E=0;
C51 COMPILER V7.09 HG1926419C 04/02/2007 09:26:24 PAGE 5
242 1 _nop_();
243 1 _nop_();
244 1 }
245
246 //S6B0108 Initial
247 #pragma disable
248 void initial()
249 {
250 1 CS1=0;CS2=0;CS3=0;
251 1 wr_cmd(0x3f); //Display On
252 1 wr_cmd(0xc0);//Set Display Start Line(Z Address)
253 1 }
254
255 //Write Data To DDRAM
256 #pragma disable
257 void wr_dots(uchar dat1,uchar dat2,uint Is_Twice)
258 {
259 1 uint page_cnt,col_cnt;
260 1 uchar pg_address;
261 1
262 1 CS1=0;CS2=0;CS3=0;
263 1 _nop_();
264 1 _nop_();
265 1
266 1 pg_address = 0xB8;
267 1 for (page_cnt=0;page_cnt<8;page_cnt++)
268 1 {
269 2 wr_cmd(pg_address); //Set Page Address(X Address)
270 2 wr_cmd(0x40);//Set Address(Y Address)
271 2 for (col_cnt=0;col_cnt<16;col_cnt++)
272 2 {
273 3 if (Is_Twice == 0)
274 3 {
275 4 wr_dat(dat1);
276 4 wr_dat(dat2);
277 4 wr_dat(dat1);
278 4 wr_dat(dat2);
279 4 }
280 3 else
281 3 {
282 4 wr_dat(dat1);
283 4 wr_dat(dat1);
284 4 wr_dat(dat2);
285 4 wr_dat(dat2);
286 4 }
287 3 }
288 2
289 2 pg_address ++;
290 2 }
291 1
292 1 delayms();
293 1 }
294
295 //Draw Border
296 #pragma disable
297 void wr_border(void)
298 {
299 1 uint page_cnt,col_cnt;
300 1 uchar pg_address;
301 1
302 1 CS1=0;CS2=0;CS3=0;
303 1 _nop_();
C51 COMPILER V7.09 HG1926419C 04/02/2007 09:26:24 PAGE 6
304 1 _nop_();
305 1
306 1 pg_address = 0xb8;
307 1 for (page_cnt=0;page_cnt<8;page_cnt++)
308 1 {
309 2 wr_cmd(pg_address); //Set Page Address(X Address)
310 2 wr_cmd(0X40);//Set Address(Y Address)
311 2 wr_dat(0xff);
312 2
313 2 for (col_cnt=1;col_cnt<63;col_cnt++)
314 2 {
315 3 wr_dat(border_inf[page_cnt]);
316 3 }
317 2 wr_dat(0xff);
318 2 pg_address ++;
319 2 }
320 1
321 1 delayms();
322 1
323 1 }
324
325 //Display Chinese Character
326 #pragma disable
327 void disp_bmp(uchar_code *bmparea,uchar uc_IsRev)
328 {
329 1 uint page_cnt,col_cnt;
330 1 uchar pg_address;
331 1
332 1 CS1=0;CS2=1;CS3=1;
333 1 _nop_();
334 1 _nop_();
335 1 pg_address=0xb8;
336 1 wr_cmd(0xc0);
337 1 for(page_cnt=0;page_cnt<8;page_cnt++)
338 1 {
339 2 wr_cmd(pg_address);
340 2 wr_cmd(0x40);
341 2
342 2 for(col_cnt=0;col_cnt<64;col_cnt++)
343 2 if (uc_IsRev ==0)
344 2 wr_dat(bmparea[page_cnt*192 + col_cnt]);
345 2 else
346 2 wr_dat(0xFF -bmparea[page_cnt*192 + col_cnt]);
347 2
348 2 pg_address++;
349 2 }
350 1 delay();
351 1
352 1 CS1=1;CS2=0;CS3=1;
353 1 _nop_();
354 1 _nop_();
355 1 pg_address=0xb8;
356 1 wr_cmd(0xc0);
357 1 for(page_cnt=0;page_cnt<8;page_cnt++)
358 1 {
359 2 wr_cmd(pg_address);
360 2 wr_cmd(0x40);
361 2
362 2 for(col_cnt=0;col_cnt<64;col_cnt++)
363 2 if (uc_IsRev ==0)
364 2 wr_dat(bmparea[page_cnt*192 + col_cnt +64]);
365 2 else
C51 COMPILER V7.09 HG1926419C 04/02/2007 09:26:24 PAGE 7
366 2 wr_dat(0xFF -bmparea[page_cnt*192 + col_cnt +64]);
367 2
368 2
369 2 pg_address++;
370 2 }
371 1 delay();
372 1
373 1 CS1=1;CS2=1;CS3=0;
374 1 _nop_();
375 1 _nop_();
376 1 pg_address=0xb8;
377 1 wr_cmd(0xc0);
378 1 for(page_cnt=0;page_cnt<8;page_cnt++)
379 1 {
380 2 wr_cmd(pg_address);
381 2 wr_cmd(0x40);
382 2
383 2 for(col_cnt=0;col_cnt<64;col_cnt++)
384 2 if (uc_IsRev ==0)
385 2 wr_dat(bmparea[page_cnt*192 + col_cnt +128]);
386 2 else
387 2 wr_dat(0xFF -bmparea[page_cnt*192 + col_cnt +128]);
388 2
389 2 pg_address++;
390 2 }
391 1 delay();
392 1
393 1 delayms();
394 1 }
395
396
397 void main()
398 {
399 1
400 1 EA=1; //Interurupt Enabled
401 1
402 1 IT0 = 1;//INT0 Low Level Trigger
403 1
404 1 EX0 = 1;//INT0 Enabled
405 1
406 1
407 1 RST = 0;
408 1 delay();
409 1 delay();
410 1
411 1 RST = 1;
412 1 delay();
413 1
414 1 LED_NO = 0;
415 1
416 1 initial();
417 1
418 1 while (1)
419 1 {
420 2 LED_NO = 1;
421 2 wr_dots(0xff,0xff,0); //All Dots Display
422 2
423 2 LED_NO = 1;
424 2 wr_dots(0x00,0x00,0); //Clear Screen
425 2
426 2 LED_NO = 0;
427 2 wr_dots(0xaa,0xaa,0); //Seperate Rows I
C51 COMPILER V7.09 HG1926419C 04/02/2007 09:26:24 PAGE 8
428 2
429 2 LED_NO = 0;
430 2 wr_dots(0x55,0x55,0); //Seperate Rows II
431 2
432 2 LED_NO = 1;
433 2 wr_dots(0x33,0x33,1); //Seperate Rows III
434 2
435 2 LED_NO = 1;
436 2 wr_dots(0xff,0x00,0); //Seperate Columns I
437 2
438 2 LED_NO = 0;
439 2 wr_dots(0x00,0xff,0); //Seperate Columns II
440 2
441 2 LED_NO = 0;
442 2 wr_dots(0xFF,0x00,1); //Seperate Columns III
443 2
444 2 LED_NO = 1;
445 2 wr_dots(0xaa,0x55,0); //Seperate Dots I
446 2
447 2 LED_NO = 1;
448 2 wr_dots(0x55,0xaa,0); //Separate Dots II
449 2
450 2 LED_NO = 0;
451 2 wr_border();//Display The Border
452 2
453 2 LED_NO = 1;
454 2 disp_bmp(cor_pic,0);//Display The Corp Name
455 2
456 2 LED_NO = 0;
457 2 // disp_bmp(cor_pic,1);//Display The Corp Name
458 2
459 2 }
460 1 }
461
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1049 ----
CONSTANT SIZE = 1544 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 2 6
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -