📄 interrupt.lst
字号:
C51 COMPILER V7.50 INTERRUPT 07/19/2007 09:35:00 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE INTERRUPT
OBJECT MODULE PLACED IN interrupt.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE bottom\interrupt.c LARGE BROWSE INCDIR(G:\测试文件\程序\测试程序\var\;G:\测
-试文件\程序\测试程序\var\) DEBUG OBJECTEXTEND PRINT(.\interrupt.lst) OBJECT(interrupt.obj)
line level source
1 /*************************************************************************************
2
3 文件类型:
4 文件作用:
5 修改权限:
6 文件相关:
7
8 创 建 人:GeminiKQ
9 创建日期:2006.12.20
10 当前版本:Ver0.1
11
12 版本信息:Ver0.1 GeminiKQ
13
14 **************************************************************************************/
15 #include "Tiger.h"
16
17 //=======================================================
18 //函数名:Interrupt_Int0
19 //函数作用:端口中断0,中断向量 (03H)
20 //=======================================================
21 void Interrupt_Int0 (void) interrupt 0 using 2
22 {
23 1 TCON &= ~BIT1;
24 1 // user coding begin
25 1 }
26
27 //=======================================================
28 //函数名:Interrupt_Timer0
29 //函数作用:内核timer0中断,中断向量 (0BH)
30 //=======================================================
31 void Interrupt_Timer0 (void) interrupt 1 using 2
32 {
33 1 TCON &= ~BIT5;
34 1 TL0 = 0xff; //10ms
35 1 TH0 = 0xdf;
36 1 //====================读按键状态
37 1 flag_keydown.byte=flag_keydown.byte<<1;
38 1 flag_keyup.byte=flag_keyup.byte<<1;
39 1 key_down_1=Key_dn;
40 1 key_up_1=Key_up;
41 1
42 1 }
43
44 //=======================================================
45 //函数名:Interrupt_Int1
46 //函数作用:端口中断1,中断向量 (13H)
47 //=======================================================
48 void Interrupt_Int1 (void) interrupt 2 using 2
49 {
50 1 TCON &= ~BIT3;
51 1 // user coding begin
52 1 }
53
54 //=======================================================
C51 COMPILER V7.50 INTERRUPT 07/19/2007 09:35:00 PAGE 2
55 //函数名:Interrupt_Timer1
56 //函数作用:内核timer1中断,中断向量 (1BH)
57 //=======================================================
58 void Interrupt_Timer1 (void) interrupt 3 using 2
59 {
60 1 TCON &= ~BIT7;
61 1 // user coding begin
62 1 }
63
64 //=======================================================
65 //函数名:Interrupt_Timer2
66 //函数作用:内核timer2中断,中断向量 (2BH)
67 //=======================================================
68 void Interrupt_Timer2 (void) interrupt 5 using 2
69 {
70 1 T2CON &= ~BIT7;
71 1 // user coding begin
72 1 }
73
74 //=======================================================
75 //函数名:Interrupt_Uart1
76 //函数作用:内核uart1中断,中断向量 (3BH)
77 //=======================================================
78 void Interrupt_Uart1 (void) interrupt 7 using 2
79 {
80 1 if(SCON1 & BIT0)
81 1 { // 接受中断标记
82 2 SCON1 &= ~BIT0;
83 2 // user coding begin
84 2 rec_485comm(SBUF1);
85 2 }
86 1 else if(SCON1 & BIT1)
87 1 { // 发送中断标记
88 2 SCON1 &= ~BIT1;
89 2 // user coding begin
90 2 intrupt_send485();
91 2 }
92 1 }
93
94 //=======================================================
95 //函数名:Interrupt_ExInt2
96 //函数作用:外部中断2,中断向量 (43H)
97 //=======================================================
98 void Interrupt_ExInt2 (void) interrupt 8 using 2
99 {
100 1 if(ExInt2IFG & BIT0)
101 1 {// uart2 translate interrupt flag
102 2 ExInt2IFG &= ~BIT0;
103 2 SCON2 &= ~ExUTI;
104 2 SCON2 |= ExUTB8; // bit9
105 2 // user coding begin
106 2 intrupt_sendinfr();
107 2 }
108 1 else if(ExInt2IFG & BIT1)
109 1 {// uart2 receive interrupt flag
110 2 ExInt2IFG &= ~BIT1;
111 2 SCON2 &= ~ExURI;
112 2 // user coding begin
113 2 rec_infrcomm(SBUF2);
114 2 }
115 1 else if(ExInt2IFG & BIT2)
116 1 {// uart4 transfer interrupt flag
C51 COMPILER V7.50 INTERRUPT 07/19/2007 09:35:00 PAGE 3
117 2 ExInt2IFG &= ~BIT2;
118 2 SCON4 &= ~ExUTI;
119 2 SCON4 |= ExUTB8; // bit9
120 2 // user coding begin
121 2 }
122 1 else if(ExInt2IFG & BIT3)
123 1 {// uart4 receive interrupt flag
124 2 ExInt2IFG &= ~BIT3;
125 2 SCON4 &= ~ExURI;
126 2 // user coding begin
127 2 }
128 1 else if(ExInt2IFG & BIT4)
129 1 {// uart2timer0 interrupt
130 2 ExInt2IFG &= ~BIT4;
131 2 // user coding begin
132 2 }
133 1 else if(ExInt2IFG & BIT5)
134 1 {// uart4timer0 interrupt
135 2 ExInt2IFG &= ~BIT5;
136 2 // user coding begin
137 2 }
138 1 else if(ExInt2IFG & BIT6)
139 1 {// flash erase interrupt
140 2 ExInt2IFG &= ~BIT6;
141 2 // user coding begin
142 2
143 2 }
144 1 else if(ExInt2IFG & BIT7)
145 1 {// CF impluse interrupt
146 2 ExInt2IFG &= ~BIT7;
147 2 if(Flg_energ==0)
148 2 count_activCF++;
149 2 else
150 2 count_reactivCF++;
151 2 }
152 1 EXIF &= ~BIT4;
153 1 }
154 //=======================================================
155 //函数名:Interrupt_ExInt3
156 //函数作用:外部中断3,中断向量 (4BH)
157 //=======================================================
158 void Interrupt_ExInt3 (void) interrupt 9 using 2
159 {
160 1 if(ExInt3IFG & BIT0)
161 1 {
162 2 }
163 1 else if(ExInt3IFG & BIT1)
164 1 {
165 2 }
166 1 else if(ExInt3IFG & BIT2)
167 1 {
168 2 }
169 1 else if(ExInt3IFG & BIT3)
170 1 {
171 2 }
172 1 else if(ExInt3IFG & BIT4)
173 1 {
174 2 }
175 1 else if(ExInt3IFG & BIT5)
176 1 {
177 2 }
178 1 else if(ExInt3IFG & BIT6) // rtc interrupt
C51 COMPILER V7.50 INTERRUPT 07/19/2007 09:35:00 PAGE 4
179 1 { ExInt3IFG &= ~BIT6;
180 2 // user coding begin
181 2 if(sta_keyup==key_dnstation)
182 2 {if(time_keyup_on<2)
183 3 time_keyup_on++;
184 3 }
185 2 else if(sta_keyup==key_upstation)
186 2 time_keyup_on=0;
187 2
188 2 if(sta_keydn==key_dnstation)
189 2 {if(time_keydn_on<2)
190 3 time_keydn_on++;
191 3 }
192 2 else if(sta_keydn==key_upstation)
193 2 time_keydn_on=0;
194 2
195 2
196 2 }
197 1 EXIF &= ~BIT5; // clr interrupt flag
198 1 }
199 //=======================================================
200 //函数名:Interrupt_ExInt4
201 //函数作用:外部中断4,中断向量 (53H)
202 //=======================================================
203 void Interrupt_ExInt4 (void) interrupt 10 using 2
204 {
205 1 if(ExInt4IFG & BIT0)
206 1 {
207 2 ExInt4IFG &= ~BIT0;
208 2 // user coding begin
209 2 }
210 1 if(ExInt4IFG & BIT1)
211 1 {
212 2 ExInt4IFG &= ~BIT1;
213 2 // user coding begin
214 2 }
215 1 if(ExInt4IFG & BIT2)
216 1 {
217 2 ExInt4IFG &= ~BIT2;
218 2 // user coding begin
219 2 CrtlBGP += 0x02;
220 2 CrtlBGP &= ~BIT3;
221 2 }
222 1 if(ExInt4IFG & BIT3)
223 1 {
224 2 ExInt4IFG &= ~BIT3;
225 2 // user coding begin
226 2 }
227 1 if(ExInt4IFG & BIT4)
228 1 {
229 2 ExInt4IFG &= ~BIT4;
230 2 // user coding begin
231 2 }
232 1 EXIF &= ~BIT6;
233 1 }
234 //=======================================================
235 //函数名:Interrupt_PF
236 //函数作用:系统掉电预警中断,中断向量 (63H)
237 //=======================================================
238 void Interrupt_PF (void) interrupt 12 using 2
239 {// powerdown interrupt
240 1 EICON &= ~BIT3;
C51 COMPILER V7.50 INTERRUPT 07/19/2007 09:35:00 PAGE 5
241 1 // user coding begin
242 1
243 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 544 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 11 ----
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 + -