📄 lcd_bus.lst
字号:
C51 COMPILER V6.12 LCD_BUS 04/15/2008 15:11:20 PAGE 1
C51 COMPILER V6.12, COMPILATION OF MODULE LCD_BUS
OBJECT MODULE PLACED IN .\lcd_bus.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE .\lcd_bus.c DEBUG OBJECTEXTEND
stmt level source
1 #include <reg52.h>
2 #include <absacc.h>
3
4 #define uchar unsigned char
5 #define wr_cmd XBYTE[0Xfffc]
6 #define rd_cmd XBYTE[0Xfffe]
7 #define wr_dat XBYTE[0xfffd]
8
9 void delay(uchar t)
10 {
11 1 uchar i;
12 1 for(;t>0;t--)
13 1 for(i=164;i>0;i--);
14 1 }
15
16 void main()
17 {
18 1 uchar busy;
19 1 char i;
20 1 delay(10); //lcd和mcu上电复位
21 1 busy=0x80;
22 1 while(busy & 0x80)
23 1 busy=rd_cmd; //检测忙标志
24 1 busy=0x80;
25 1
26 1 wr_cmd=0x38; //功能设置
27 1
28 1 while(busy & 0x80)
29 1 busy=rd_cmd; //检测忙标志
30 1 busy=0x80;
31 1
32 1 wr_cmd=0x0c;
33 1
34 1 while(busy & 0x80)
35 1 busy=rd_cmd; //检测忙标志
36 1 busy=0x80;
37 1
38 1 while(1)
39 1 {
40 2 wr_cmd=0x01;
41 2 while(busy & 0x80)
42 2 busy=rd_cmd; //检测忙标志
43 2 busy=0x80;
44 2 wr_cmd=0x80 | 0x43;
45 2 while(busy & 0x80)
46 2 busy=rd_cmd; //检测忙标志
47 2 busy=0x80;
48 2 for(i=0;i<10;i++)
49 2 {
50 3 wr_dat=0x30+i;
51 3 delay(255);
52 3 }
53 2 wr_cmd=0x01;
54 2 while(busy & 0x80)
55 2 busy=rd_cmd; //检测忙标志
C51 COMPILER V6.12 LCD_BUS 04/15/2008 15:11:20 PAGE 2
56 2 busy=0x80;
57 2 wr_cmd=0x80|0x03;
58 2 while(busy & 0x80)
59 2 busy=rd_cmd; //检测忙标志
60 2 busy=0x80;
61 2 for(i=9;i>=0;i--)
62 2 {
63 3 wr_dat=0x30+i;
64 3 delay(255);
65 3 }
66 2 }
67 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 182 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
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 + -