📄 kanmen.lst
字号:
C51 COMPILER V8.08 KANMEN 09/04/2007 19:56:01 PAGE 1
C51 COMPILER V8.08, COMPILATION OF MODULE KANMEN
OBJECT MODULE PLACED IN kanmen.OBJ
COMPILER INVOKED BY: D:\Keil\C51\BIN\C51.EXE kanmen.c BROWSE DEBUG OBJECTEXTEND
line level source
1 // 3. AT89C2051和X25045的初始化程序:
2 #include <REG51.H> /* special function register declarations */
3 /* for the intended AT89C2051 derivative */
4 #include <stdio.h> /* prototype declarations for I/O functions */
5 #ifdef MONITOR51 // Debugging with Monitor-51 needs
char code reserve [3] _at_ 0x23; // space for serial interrupt if
#endif // Stop Exection with Serial Intr.
8 sbit P1_1=P1^1; /* SI connect to P1^1 */
9 sbit P3_4=P3^4; /* SCK connect to P3^4 */
10 sbit P3_5=P3^5; //when running this program, /WP is high
11 void timer0 (void) interrupt 1 using 2 //define timer0 interrupt
12 { P3_4=!P3_4;}
13 void timer1 (void) interrupt 3 using 2 //define timer1 interrupt
14 {do{}while(P3_4!=0||!TF0);
15 1 P1_1=0;
16 1 do{}while(P3_4!=0||!TF0);
17 1 P1_1=0;
18 1 do{}while(P3_4!=0||!TF0);
19 1 P1_1=0;
20 1 do{}while(P3_4!=0||!TF0);
21 1 P1_1=0;
22 1 do{}while(P3_4!=0||!TF0);
23 1 P1_1=0;
24 1 do{}while(P3_4!=0||!TF0);
25 1 P1_1=1;
26 1 do{}while(P3_4!=0||!TF0);
27 1 P1_1=1;
28 1 do{}while(P3_4!=0||!TF0);
29 1 P1_1=0; //WREN instruciton:00000110B
30 1 do{}while(P3_4!=0||!TF0);
31 1 P1_1=0;
32 1 do{}while(P3_4!=0||!TF0);
33 1 P1_1=0;
34 1 do{}while(P3_4!=0||!TF0);
35 1 P1_1=0;
36 1 do{}while(P3_4!=0||!TF0);
37 1 P1_1=0;
38 1 do{}while(P3_4!=0||!TF0);
39 1 P1_1=0;
40 1 do{}while(P3_4!=0||!TF0);
41 1 P1_1=0;
42 1 do{}while(P3_4!=0||!TF0);
43 1 P1_1=1;
44 1 do{}while(P3_4!=0||!TF0);
45 1 P1_1=0; //Write instruction:00000010B
46 1
47 1 do{}while(P3_4!=0||!TF0);
48 1 P1_1=0;
49 1 do{}while(P3_4!=0||!TF0);
50 1 P1_1=0;
51 1 do{}while(P3_4!=0||!TF0);
52 1 P1_1=1;
53 1 do{}while(P3_4!=0||!TF0);
54 1 P1_1=0;
55 1 do{}while(P3_4!=0||!TF0);
C51 COMPILER V8.08 KANMEN 09/04/2007 19:56:01 PAGE 2
56 1 P1_1=0;
57 1 do{}while(P3_4!=0||!TF0);
58 1 P1_1=0;
59 1 do{}while(P3_4!=0||!TF0);
60 1 P1_1=1;
61 1 do{}while(P3_4!=0||!TF0);
62 1 P1_1=1;
63 1 //WD1=1,WD0=0,RESET time is 200ms, BL1=0,BL0=0,no block
64 1 //protect,STATUS_REG:00100000B
65 1 }
66 void main (void) {
67 1 P3_5=0; // enable /CS
68 1 /* setup the timer 0 interrupt */
69 1 TH0 = 0xFF; // set timer period; t is 10 us; set the frequency of sclk is 50khz
70 1 TL0 = 0xF6;
71 1 TMOD = TMOD | 0x11; // select mode 1
72 1 TR0 = 1; // start timer 0
73 1 ET0 = 1; // enable timer 0 interrupt
74 1 EA = 1; // global interrupt enable
75 1 /* setup the timer 1 interrupt */
76 1 TH1 = 0x28; // set timer period ; feed dog time is 60 ms
77 1 TL1 = 0x00;
78 1 TMOD = TMOD | 0x11; // select mode 1
79 1 TR1 = 1; // start timer 1
80 1 ET1 = 1; // enable timer 1 interrupt
81 1 EA = 1; // global interrupt enable
82 1 do{}while(!TF0&&!TF1); //wait for timer0 interrupt or timer 1 interrupt
83 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 235 ----
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 + -