ct_test/Keil_C/List/SC_it.lst

257 lines
11 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

C51 COMPILER V9.59.0.0 SC_IT 01/18/2024 10:03:08 PAGE 1
C51 COMPILER V9.59.0.0, COMPILATION OF MODULE SC_IT
OBJECT MODULE PLACED IN ..\Output\SC_it.obj
COMPILER INVOKED BY: D:\Keil_v5\C51\BIN\C51.EXE ..\User\SC_it.c LARGE OBJECTADVANCED OPTIMIZE(8,SIZE) BROWSE INCDIR(..\F
-WLib\SC92F_Lib\inc;..\User;..\Apps;..\Apps;..\User) DEFINE(SC92F836xB) DEBUG PRINT(..\List\SC_it.lst) OBJECT(..\Output\S
-C_it.obj)
line level source
1 //************************************************************
2 // Copyright (c)
3 // FileName : SC_it.c
4 // Function : Interrupt Service Routine
5 // Instructions :
6 // Date : 2022/03/03
7 // Version : V1.0002
8 //*************************************************************
9 /********************Includes************************************************************************/
10 #include "SC_it.h"
11 #include "..\Drivers\SCDriver_list.h"
12 #include "HeadFiles\SC_itExtern.h"
13 #include "uart1.h"
14 #include "motor.h"
15 #include "adc.h"
16
17 #define IT_5S_CNT 5000 //计数5000
18 #define IT_2S_CNT 2000 //计数2000
19 #define IT_1S_CNT 1000 //计数1000
20 #define IT_100MS_CNT 100 //计数100
21 #define IT_10MS_CNT 10 //计数10
22 #define IT_1MS_CNT 1 //计数1
23 #define IT_2MS_CNT 2 //计数2
24 #define IT_3MS_CNT 3 //计数3
25 #define IT_4MS_CNT 4 //计数4
26 #define IT_5MS_CNT 5 //计数5
27
28 bit it_5s_flag = 0; //5s定时标志
29 unsigned int xdata it_5s_cnt = 0;
30
31 bit it_2s_flag = 0; //2s定时标志
32 unsigned int xdata it_2s_cnt = 0;
33
34 bit it_1s_flag = 0; //1s定时标志
35 unsigned int xdata it_1s_cnt = 0;
36
37 bit it_100ms_flag = 0; //100ms定时标志
38 unsigned int xdata it_100ms_cnt = 0;
39
40 bit it_10ms_flag = 0; //10ms定时标志
41 unsigned int xdata it_10ms_cnt = 0;
42
43 bit it_1ms_flag = 0; //1ms定时标志
44 unsigned int xdata it_1ms_cnt = 0;
45
46 bit it_2ms_flag = 0; //2ms定时标志
47 unsigned int xdata it_2ms_cnt = 0;
48
49 bit it_3ms_flag = 0; //3ms定时标志
50 unsigned int xdata it_3ms_cnt = 0;
51
52 bit it_4ms_flag = 0; //4ms定时标志
53 unsigned int xdata it_4ms_cnt = 0;
C51 COMPILER V9.59.0.0 SC_IT 01/18/2024 10:03:08 PAGE 2
54
55 bit it_5ms_flag = 0; //5ms定时标志
56 unsigned int xdata it_5ms_cnt = 0;
57 /**************************************Generated by EasyCodeCube*************************************/
58
59 /*************************************.Generated by EasyCodeCube.************************************/
60
61 void Timer0Interrupt() interrupt 1
62 {
63 1 /*TIM0_it write here begin*/
64 1
65 1 TH0 = 0xFC;//高8位初值
66 1 TL0 = 0x17;//低8位初值
67 1
68 1 /*TIM0_it write here*/
69 1 /*<Generated by EasyCodeCube begin>*/
70 1 /*<UserCodeStart>*//*<SinOne-Tag><6>*/
71 1 //Timer0Interrupt
72 1 {
73 2 /*<UserCodeStart>*//*<SinOne-Tag><7>*/
74 2 //5秒
75 2 it_5s_cnt++;
76 2 if(it_5s_cnt >= IT_5S_CNT)
77 2 {
78 3 it_5s_flag = 1;
79 3 it_5s_cnt = 0;
80 3 }
81 2
82 2 //2秒
83 2 it_2s_cnt++;
84 2 if(it_2s_cnt >= IT_2S_CNT)
85 2 {
86 3 it_2s_flag = 1;
87 3 it_2s_cnt = 0;
88 3 }
89 2
90 2 //秒
91 2 it_1s_cnt++;
92 2 if(it_1s_cnt >= IT_1S_CNT)
93 2 {
94 3 it_1s_flag = 1;
95 3 it_1s_cnt = 0;
96 3 }
97 2
98 2 //100毫秒
99 2 it_100ms_cnt++;
100 2 if(it_100ms_cnt >= IT_100MS_CNT)
101 2 {
102 3 it_100ms_flag = 1;
103 3 it_100ms_cnt = 0;
104 3 }
105 2
106 2 //10毫秒
107 2 it_10ms_cnt++;
108 2 if(it_10ms_cnt >= IT_10MS_CNT)
109 2 {
110 3 it_10ms_flag = 1;
111 3 it_10ms_cnt = 0;
112 3 }
113 2
114 2
115 2 /*<UserCodeEnd>*//*<SinOne-Tag><7>*/
C51 COMPILER V9.59.0.0 SC_IT 01/18/2024 10:03:08 PAGE 3
116 2 /*<Begin-Inserted by EasyCodeCube for Condition>*/
117 2 }
118 1 /*<UserCodeEnd>*//*<SinOne-Tag><6>*/
119 1 /*<Generated by EasyCodeCube end>*/
120 1 /*Timer0Interrupt Flag Clear begin*/
121 1 /*Timer0Interrupt Flag Clear end*/
122 1 }
123
124
125 void Timer1Interrupt() interrupt 3
126 {
127 1 /*TIM1_it write here begin*/
128 1
129 1 TIM1_Mode1SetReloadCounter(53536);
130 1
131 1 /*TIM1_it write here*/
132 1 /*<Generated by EasyCodeCube begin>*/
133 1 /*<Generated by EasyCodeCube end>*/
134 1 {
135 2 /*<UserCodeStart>*//*<SinOne-Tag><7>*/
136 2 //1毫秒
137 2 it_1ms_cnt++;
138 2 if(it_1ms_cnt >= IT_1MS_CNT)
139 2 {
140 3 it_1ms_flag = 1;
141 3 it_1ms_cnt = 0;
142 3 }
143 2
144 2 //2毫秒
145 2 it_2ms_cnt++;
146 2 if(it_2ms_cnt >= IT_2MS_CNT)
147 2 {
148 3 it_2ms_flag = 1;
149 3 it_2ms_cnt = 0;
150 3 }
151 2
152 2 //3毫秒
153 2 it_3ms_cnt++;
154 2 if(it_3ms_cnt >= IT_3MS_CNT)
155 2 {
156 3 it_3ms_flag = 1;
157 3 it_3ms_cnt = 0;
158 3 }
159 2
160 2 //4毫秒
161 2 it_4ms_cnt++;
162 2 if(it_4ms_cnt >= IT_4MS_CNT)
163 2 {
164 3 it_4ms_flag = 1;
165 3 it_4ms_cnt = 0;
166 3 }
167 2
168 2 //5毫秒
169 2 it_5ms_cnt++;
170 2 if(it_5ms_cnt >= IT_5MS_CNT)
171 2 {
172 3 it_5ms_flag = 1;
173 3 it_5ms_cnt = 0;
174 3 }
175 2 /*<UserCodeEnd>*//*<SinOne-Tag><7>*/
176 2 /*<Begin-Inserted by EasyCodeCube for Condition>*/
177 2 }
C51 COMPILER V9.59.0.0 SC_IT 01/18/2024 10:03:08 PAGE 4
178 1 /*Timer1Interrupt Flag Clear begin*/
179 1 /*Timer1Interrupt Flag Clear end*/
180 1 }
181
182 void ADCInterrupt() interrupt 6
183 {
184 1 // /*ADC_it write here begin*/
185 1
186 1 // /*<Generated by EasyCodeCube begin>*/
187 1 // /*<Generated by EasyCodeCube end>*/
188 1
189 1
190 1 /*ADCInterrupt Flag Clear end*/
191 1 ADC_ClearFlag();
192 1 }
193 #if defined (SC92F854x) || defined (SC92F754x) ||defined (SC92F844xB) || defined (SC92F744xB)||defined (
-SC92F84Ax_2) || defined (SC92F74Ax_2)|| defined (SC92F846xB) \
194 || defined (SC92F746xB) || defined (SC92F836xB) || defined (SC92F736xB) || defined (SC92F8003)||defined (
-SC92F84Ax) || defined (SC92F74Ax) || defined (SC92F83Ax) \
195 || defined (SC92F73Ax) || defined (SC92F7003) || defined (SC92F740x) || defined (SC92FWxx) || defined (SC9
-3F743x) || defined (SC93F833x) || defined (SC93F843x)\
196 || defined (SC92F848x) || defined (SC92F748x)|| defined (SC92F859x) || defined (SC92F759x)
197 extern bit SSI_FLAG;
198 void SSIInterrupt() interrupt 7
199 {
200 1 /*SSI_it write here begin*/
201 1 if(SSI_GetFlagStatus(UART1_FLAG_TI) == SET) //UART1发送中断标志位TI
202 1 {
203 2 SSI_FLAG = 0;
204 2 SSI_ClearFlag(UART1_FLAG_TI);
205 2 }
206 1
207 1 if(SSI_GetFlagStatus(UART1_FLAG_RI) == SET)//UART1接收中断标志位RI
208 1 {
209 2 unsigned char ch = 0;
210 2 ch = SSI_UART1_ReceiveData8();
211 2 receive_ttl_data(ch);//放串口中断内,接收数据
212 2 SSI_ClearFlag(UART1_FLAG_RI);
213 2 }
214 1 /*SSIInterrupt Flag Clear end*/
215 1 }
216
217 #endif
218
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 588 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 20 1
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = 10 ----
EDATA SIZE = ---- ----
HDATA SIZE = ---- ----
XDATA CONST SIZE = ---- ----
FAR CONST SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)