📄 595.lst
字号:
C51 COMPILER V7.05 595 01/30/2003 17:20:40 PAGE 1
C51 COMPILER V7.05, COMPILATION OF MODULE 595
OBJECT MODULE PLACED IN 595.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 595.c DEBUG OBJECTEXTEND
stmt level source
1 #include "595.H"
2 #include <stdio.h>
3 #include <reg52.h>
4 #include <intrins.h>
5 #include <string.h>
6 sbit CS=P0^5;
7 sbit SCK=P0^4;
8 sbit SI=P0^6;
9 sbit wdg = P1^0;
10 unsigned char idata outbyte=0xff;
11 unsigned char code charcode[18]={0x82,0xfa,0x46,0x52,0x3a,0x13,0x03,0xda,0x02,0x12,0x7f,0x1a,0x13,0x67,0x7
-f,0xff,0x62};//d
12 //*******************************
13 void OutByte(unsigned char b)
14 {
15 1 unsigned char i,j;
16 1 unsigned char bb=0x80;
17 1 CS=0;
18 1 for(i=0;i<8;i++)
19 1 {
20 2 //SCK=0;
21 2 SI=b&bb;
22 2 bb>>=1;
23 2 _nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;
24 2 SCK=0;
25 2 for(j=0;j<16;j++);
26 2 SCK=1;
27 2 for(j=0;j<16;j++);
28 2
29 2 }
30 1 CS=1;
31 1 }
32
33 /****************************************************************************/
34
35
36 void Delay100ms(unsigned char x)
37 {
38 1 unsigned char i,j;
39 1
40 1 while(x-- != 0)
41 1 { wdg=!wdg;
42 2 for (j = 0;j < 114; j++)for (i = 0;i < 88; i++){_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;
43 3 _nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_(
-) ;
44 3 _nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_() ;_nop_(
-) ;
45 3 _nop_() ;_nop_() ;_nop_() ;};
46 2 }
47 1 }
48
49 //$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$4
50 void SendStr_MAX7219(unsigned char *Data)
51 {
52 1 char i;
C51 COMPILER V7.05 595 01/30/2003 17:20:40 PAGE 2
53 1 CS=0;
54 1 for(i=0;i<10;i++)
55 1 { if(Data[i]==0x64)
56 2 Data[i]=16;//charcode[14];
57 2 if(Data[i]>=0x30)
58 2 Data[i]=Data[i]-0x30;
59 2 if(Data[i]==0x20)
60 2 Data[i]=15;//charcode[14];
61 2
62 2
63 2 }
64 1
65 1 OutByte(charcode[Data[3]]);
66 1 OutByte(charcode[Data[2]]);
67 1 OutByte((charcode[Data[1]])&0xfd);
68 1 OutByte(charcode[Data[0]]);
69 1 CS=1;
70 1 _nop_() ;_nop_() ;_nop_() ; _nop_() ;_nop_() ;_nop_() ; _nop_() ;_nop_() ;_nop_() ; _nop_() ;_nop_() ;_n
-op_() ;
71 1 CS=0;
72 1 }
73
74 /***********************/
75 main()
76 {
77 1 unsigned char i,ms[10];
78 1 unsigned int y;
79 1 // dog=!dog;
80 1
81 1 IP=0x04;
82 1
83 1 TR0=1;
84 1 IT0=0;
85 1 EX0=0;
86 1 IT1=1;
87 1 EX1=0; //外部中断1开放
88 1 ET0=1;
89 1 ES=0 ; //串口中断打开
90 1 //init_com();
91 1 EA=0;
92 1
93 1 //i=0;
94 1 //SendStr_MAX7219("1234");
95 1 //flash_led();
96 1 // Delay100ms(10);
97 1 while(1)
98 1 { P0=0X00;
99 2 P0=0X02;
100 2 P0=0X04;
101 2 P0=0X08;
102 2 // sprintf(ms,"12345678%2bd",i);
103 2 // i++;
104 2 /// if(i>100)i=0;
105 2 // SendStr_MAX7219(ms);
106 2
107 2 /*OutByte(charcode[1]);
108 2 Delay100ms(20);
109 2 OutByte(0xfa);
110 2 Delay100ms(20);
111 2 OutByte(0x46);
112 2 Delay100ms(20);
113 2 OutByte(0x52);
C51 COMPILER V7.05 595 01/30/2003 17:20:40 PAGE 3
114 2 Delay100ms(20);
115 2 // Delay100ms(1);
116 2 wdg=!wdg;
117 2 Delay100ms(1);
118 2 //sprintf(ms,"1234");
119 2 //SendStr_MAX7219(ms);
120 2
121 2 y++;*/
122 2
123 2
124 2 }
125 1 }
*** WARNING C280 IN LINE 77 OF 595.C: 'i': unreferenced local variable
*** WARNING C280 IN LINE 77 OF 595.C: 'ms': unreferenced local variable
*** WARNING C280 IN LINE 78 OF 595.C: 'y': unreferenced local variable
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 333 ----
CONSTANT SIZE = 18 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 16
IDATA SIZE = 1 ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 3 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -