?? system.lst
字號(hào):
C51 COMPILER V7.50 SYSTEM 01/06/2006 13:37:02 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE SYSTEM
OBJECT MODULE PLACED IN System.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE System.c BROWSE MODDP2 DEBUG OBJECTEXTEND
line level source
1 #include"REG1210.h"
2 #include"STRING.H"
3 #include"STDLIB.H"
4 #include"MATH.H"
5 #include"OLED.H"
6 #include"UART.H"
7 #include"SystemDeclare.h"
8 #include"CONVERT.H"
9
10 sbit OLED_NRST = P2^5;
11
12 //////////////////////////////////////////////////////////////////////////
13 void UsartInterrupt(void) interrupt 4 using 2
14 { EA=0;
15 1 if(TI_0==1)
16 1 {
17 2 TI_0=0;
18 2 UsartSend();
19 2 }
20 1 if(RI_0==1)
21 1 {
22 2 RI_0=0;
23 2 UsartReceive();
24 2 }
25 1 EA=1;
26 1 }
27 //////////////////////////////////////////////////////////////////////////
28 void T2Interrupt(void) interrupt 5 using 1
29 {
30 1 T2Service();
31 1 }
32
33
34 main()
35 {
36 1 unsigned char i;
37 1
38 1
39 1 SystemInitialization();
40 1 OLEDPutchar(0,0,UsartSendBuff,32);
41 1 Delay500uS(10000);
42 1
43 1 while(1)
44 1 {
45 2 //USART finish sending package process
46 2 if (Usart.FinishSending==1)
47 2 {
48 3 Usart.FinishSending=0;
49 3 Usart.SendLength=0;
50 3 Usart.SentLength=0;
51 3 }
52 2 //USART finish sending package process
53 2
54 2
55 2 //USART received package process
C51 COMPILER V7.50 SYSTEM 01/06/2006 13:37:02 PAGE 2
56 2 if (Usart.FinishReceiving==1)
57 2 {
58 3 Usart.FinishReceiving=0;
59 3 Usart.ReceiveTimeOut=0xFF;
60 3 Usart.ReceivedLength=0;
61 3
62 3
63 3 //串口接收到的數(shù)據(jù)和命令處理函數(shù)//
64 3 if ( strncmp( &UsartReceiveBuff[0], "DISDATA ", 8 ) ==0 )
65 3 {
66 4 OLEDPutchar( 0, 0, &UsartReceiveBuff[8], UARTBuffLength-5 ); //在OLED上顯示PC發(fā)送下來(lái)的
-數(shù)據(jù)
67 4 }
68 3
69 3 else if ( strncmp( &UsartReceiveBuff[0], "SETFORE ", 8 ) ==0 ) //設(shè)置前景色
70 3 {
71 4 ColourSetting.Foreground = StringToHex( &UsartReceiveBuff[8], 2 );
72 4 }
73 3
74 3 else if ( strncmp( &UsartReceiveBuff[0], "SETBACK ", 8 ) ==0 ) //設(shè)置背景色
75 3 {
76 4 ColourSetting.Background = StringToHex( &UsartReceiveBuff[8], 2 );
77 4 }
78 3
79 3 else if ( strncmp( &UsartReceiveBuff[0], "SETCONT ", 8 ) ==0 ) //設(shè)置對(duì)比度
80 3 {
81 4 OLEDWriteCommand(0x81);
82 4 OLEDWriteCommand( StringToHex( &UsartReceiveBuff[8], 2 ) );
83 4 }
84 3
85 3 else if ( strncmp( &UsartReceiveBuff[0], "DISON", 5 ) ==0 ) //開(kāi)顯示
86 3 {
87 4 OLEDWriteCommand(0xAF);
88 4 }
89 3
90 3 else if ( strncmp( &UsartReceiveBuff[0], "DISOFF", 6 ) ==0 ) //關(guān)顯示
91 3 {
92 4 OLEDWriteCommand(0xAE);
93 4 }
94 3
95 3 else
96 3 {
97 4 }
98 3 //串口接收到的數(shù)據(jù)和命令處理函數(shù)//
99 3
100 3
101 3
102 3 /////////////////返回調(diào)試信息給PC
103 3 for(i=0;i<UARTBuffLength;i++)
104 3 {
105 4 UsartSendBuff[i]=UsartReceiveBuff[i];
106 4 }
107 3 Usart.SendLength=UARTBuffLength;
108 3 Usart.SentLength=0;
109 3 TI_0=1;
110 3
111 3 while(Usart.FinishSending==0) ; //等待發(fā)送完畢
112 3 Usart.FinishSending=0;
113 3 Usart.SendLength=0;
114 3 Usart.SentLength=0;
115 3 /////////////////返回調(diào)試信息給PC
116 3
C51 COMPILER V7.50 SYSTEM 01/06/2006 13:37:02 PAGE 3
117 3
118 3 /////////////////清UART接受緩沖
119 3 for(i=0;i<UARTBuffLength;i++)
120 3 {
121 4 UsartReceiveBuff[i]=0;
122 4 }
123 3 /////////////////清UART接受緩沖
124 3
125 3 }
126 2 //USART received package process
127 2 }
128 1 }
129
130
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 471 ----
CONSTANT SIZE = 49 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 1
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -