📄 isr.lst
字号:
C51 COMPILER V7.50 ISR 07/03/2006 14:17:03 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE ISR
OBJECT MODULE PLACED IN ..\..\OUTPUT\NTSC_SOUTH\Isr.obj
COMPILER INVOKED BY: d:\Keil\C51\BIN\C51.EXE ..\..\KERNEL\Isr.c OPTIMIZE(9,SIZE) BROWSE ORDER INCDIR(..\..\INC\;..\..\UI
-\NTSC_SOUTH\) DEFINE(PABLO,MCU_MTV412M,OLGA) DEBUG OBJECTEXTEND PRINT(..\..\OUTPUT\NTSC_SOUTH\Isr.lst) OBJECT(..\..\OUTP
-UT\NTSC_SOUTH\Isr.obj)
line level source
1 /******************************************************************************
2 Copyright (c) 2003 MStar Semiconductor, Inc.
3 All rights reserved.
4
5 [Module Name]: Isr.c
6 [Date]: 24-Dec-2003
7 [Comment]:
8 MCU interrupt service routines.
9 [Reversion History]:
10 *******************************************************************************/
11
12 #define _ISR_C_
13
14 // System
15 #include "board.h"
16 #include "bd_mst.h"
17 // Common
18 #include "define.h"
19 #include "mcu.h"
20 #include "userdef.h"
21 // External
22 #include "global.h"
23 #include "Userpref.h"
24 #include "keypad.h"
25 #include "uart.h"
26 #include "ir.h"
27
28 // Internal
29 #include "isr.h"
30
31
32 //////////////////////////////////////////////////////////////////////////////
33 // <Function>: isrINT1_S
34 //
35 // <Description>: MCU INT1 interrupt servicee routine
36 ///////////////////////////////////////////////////////////////////////////////
37 void isrInt0_S(void) interrupt 0
38 {
39 1 // stop main loop for debug (Uart Command Test Command 0x51)
40 1 if (!g_bDebugProgStopFlag)
41 1 {
42 2 irInterruptProcess(IR_HEADER_CODE0, IR_HEADER_CODE1);
43 2 }
44 1 }
45
46 //////////////////////////////////////////////////////////////////////////////
47 // <Function>: isrTimer0_S
48 //
49 // <Description>: MCU Timer0 interrupt servicee routine
50 ///////////////////////////////////////////////////////////////////////////////
51 void isrTimer0_S(void) interrupt 1
52 {
53 1 static BYTE count = 1;
C51 COMPILER V7.50 ISR 07/03/2006 14:17:03 PAGE 2
54 1 static BYTE KeyCount = 0;
55 1
56 1 TH0 = HIBYTE(ISR_TIMER0_COUNTER);
57 1 TL0 = LOBYTE(ISR_TIMER0_COUNTER);
58 1
59 1 irDetectTimer0(); //Ir detecting
60 1
61 1 if (1)
62 1 {// Keypad dectecting
63 2 if (KeyCount == 1)
64 2 {
65 3 MADC = 0x82; //Key_AD1
66 3 }
67 2 else if (KeyCount == 7) //14
68 2 {
69 3 keyScanStatus(Key_AD1);
70 3 MADC = 0x81; //Key_AD0
71 3 }
72 2 else if (KeyCount == 14) //28
73 2 {
74 3 keyScanStatus(Key_AD0);
75 3 KeyCount = 0;
76 3 }
77 2 KeyCount++;
78 2 }
79 1
80 1 if (count < 2)
81 1 {
82 2 count++;
83 2 }
84 1 else
85 1 {// When 1ms reach..
86 2 count = 1;
87 2
88 2 // second counter
89 2 if ((--g_wMilliSecond) == 0)
90 2 {
91 3 g_bSecondTickFlag = 1;
92 3 g_wMilliSecond = SECOND_TICK;
93 3 }
94 2 if ((g_wMilliSecond & 0x0f) == 0)
95 2 {
96 3 g_b16msTickFlag = 1;
97 3 }
98 2 if (g_ucKeyReleaseCounter)
99 2 g_ucKeyReleaseCounter--;
100 2 }
101 1 }
102
103 ///////////////////////////////////////
104 // Uart Interrupt
105 ///////////////////////////////////////
106 void uartInterrupt(void) interrupt 4
107 {
108 1 //EA = 0; // disable all interrupt
109 1
110 1 if (!_testbit_(TI)) // check translate interrupt
111 1 {
112 2 ucUartCheckTick = 2;
113 2
114 2 RI = 0; // clear recieve interrupt
115 2
C51 COMPILER V7.50 ISR 07/03/2006 14:17:03 PAGE 3
116 2 g_UartCommand.Buffer[g_UartCommand.Index] = SBUF; // recieve byte
117 2
118 2 // check command buffer index
119 2 if (UART_EXT)
120 2 {
121 3 if (g_UartCommand.Index == 0) // check 1st data
122 3 g_UartCommand.Index++; // for get UART_CMD_EXT_LENGTH
123 3 else
124 3 {
125 4 if (g_UartCommand.Index < UART_CMD_EXT_LENGTH) // still read command
126 4 g_UartCommand.Index++; // next index of command buffer
127 4 if (g_UartCommand.Index >= UART_CMD_EXT_LENGTH) // read command ok
128 4 {
129 5 g_bUartDetected = TRUE; // command buffer recieve ok
130 5 g_UartCommand.Index = 0; // reset index of command buffer
131 5 ucUartCheckTick = 0;
132 5 }
133 4 }
134 3 }
135 2 else
136 2 {
137 3 if (g_UartCommand.Index < UART_CMD_LENGTH) // still read command
138 3 g_UartCommand.Index++; // next index of command buffer
139 3 if (g_UartCommand.Index >= UART_CMD_LENGTH) // read command ok
140 3 {
141 4 g_bUartDetected = TRUE; // command buffer recieve ok
142 4 g_UartCommand.Index = 0; // reset index of command buffer
143 4 ucUartCheckTick = 0;
144 4 }
145 3 }
146 2 } // if TI
147 1 //EA = 1; // release EA bit
148 1 }
149
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 380 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 1 ----
PDATA SIZE = ---- ----
DATA SIZE = 2 ----
IDATA SIZE = ---- ----
BIT SIZE = 2 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -