📄 lcdop.lst
字号:
C51 COMPILER V8.02 LCDOP 02/17/2009 14:20:35 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE LCDOP
OBJECT MODULE PLACED IN .\OBJ\LcdOP.obj
COMPILER INVOKED BY: D:\StudyTools\Keil C\C51\BIN\C51.EXE SRC\LcdOP.c BROWSE DEBUG OBJECTEXTEND PRINT(.\LST\LcdOP.lst) O
-BJECT(.\OBJ\LcdOP.obj)
line level source
1 #define _LCD_INCLUDE
2 #include "include.h"
3
4 //=======================Pin Define==========================
5 sbit LcdCL = P1^0;
6 sbit LcdDI = P1^1;
7 sbit LcdCE = P1^2;
8
9 code BYTE CCBADDR[]={0x41};
10 code BYTE StrDispOther[]={0x00,0x00,0x00,0x00,0x00};//remains 5 bytes inclued DR SC BU
11 code WORD StrDisp[]={0x6301,0x6000,0x4718,0x1234,0x2345,//0~4
12 0x0000,0x6000,0x4718,0x1234,0x2345,//5~9
13 0x0000,0x6000,0x4718,0x1234,0x2345,//A~E
14 0x0000,0x6000,0x4718,0x1234,0x2345,//F~J
15 0x0000,0x6000,0x4718,0x1234,0x2345,//K~O
16 0x0000,0x6000,0x4718,0x1234,0x2345,//P~T
17 0x0000,0x6000,0x4718,0x1234,0x2345,//U~Y
18 0x2345};//Z
19
20 WORD *DispDataPstr = StrDisp;
21 //====================================================
22 void LcdSendOneByte(BYTE Data)
23 {
24 1 BYTE DataBit;
25 1
26 1 for (DataBit = 0; DataBit < 8; DataBit++)
27 1 {
28 2 LcdCL = 0;
29 2 if (Data & 0x01) //LSB send first
30 2 LcdDI = 1;
31 2 else
32 2 LcdDI = 0;
33 2 LcdCL = 1;
34 2 Data >>= 1;
35 2 }
36 1 }
37
38 void LcdSend15Bits(WORD Data)
39 {
40 1 BYTE DataBit;
41 1
42 1 for (DataBit = 0; DataBit < 15; DataBit++)
43 1 {
44 2 LcdCL = 0;
45 2 if (Data & 0x01) //LSB send first
46 2 LcdDI = 1;
47 2 else
48 2 LcdDI = 0;
49 2 LcdCL = 1;
50 2 Data >>= 1;
51 2 }
52 1 }
53
54 void LcdDisplay(WORD *DataPstr)
C51 COMPILER V8.02 LCDOP 02/17/2009 14:20:35 PAGE 2
55 {
56 1 BYTE ByteCount, *StrDataPstr;
57 1
58 1 //CCBADDR = 0x41
59 1 LcdSendOneByte(*CCBADDR);
60 1
61 1 //send data display
62 1 LcdCE = 1; //enable Lcd chip
63 1 for (ByteCount = 0; ByteCount < 8; ByteCount++)
64 1 {
65 2 LcdSend15Bits(*DataPstr);
66 2 DataPstr++;
67 2 if (DataPstr > StrDisp + 35) //0 will behind the z
68 2 DataPstr = StrDisp;
69 2 }
70 1
71 1 //send others include DR SC BU
72 1 StrDataPstr = StrDispOther;
73 1 for (ByteCount = 0; ByteCount < sizeof(StrDispOther); ByteCount++)
74 1 {
75 2 LcdSendOneByte(*StrDataPstr);
76 2 DataPstr++;
77 2 }
78 1
79 1 LcdCE = 0; //disable Lcd chip
80 1 }
81
82 void LcdRollOver(BYTE RollFlag)
83 {
84 1 LcdDisplay(DispDataPstr);
85 1 if (RollFlag == LEFT)
86 1 {
87 2 DispDataPstr++;
88 2 if (DispDataPstr > StrDisp + 35)
89 2 DispDataPstr = StrDisp;
90 2 }
91 1 else
92 1 {
93 2 DispDataPstr--;
94 2 if (DispDataPstr < StrDisp)
95 2 DispDataPstr = StrDisp + 35;
96 2 }
97 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 244 ----
CONSTANT SIZE = 78 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 3 4
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 + -