请教一个PIC单片机的问题
我刚接触PIC,试一个中断的程序,下面是程序和错误提示,请教一下原因。谢谢了!Languagetoolversions:MPASMWIN.exev5.30.01,mpli...
我刚接触PIC,试一个中断的程序,下面是程序和错误提示,请教一下原因。谢谢了!
Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01 Preprocessor symbol `__DEBUG' is defined. Target debug platform is `__MPLAB_DEBUGGER_ICD2=1'. Debug platform options are: `__ICD2RAM=1'. Wed Jun 09 19:55:19 2010 ---------------------------------------------------------------------- Clean: Deleting intermediary and output files. Clean: Done. Executing: "D:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F684 "ABC.ASM" /l"ABC.lst" /e"ABC.err" /d__DEBUG=1 /d__MPLAB_DEBUGGER_ICD2=1 Error[113] D:\PROGRAM FILES\MICROCHIP\MPLAB IDE\ICD2\ABC.ASM 9 : Symbol not previously defined (LOOP) Error[121] D:\PROGRAM FILES\MICROCHIP\MPLAB IDE\ICD2\ABC.ASM 31 : Illegal label (LOOP) Message[302] D:\PROGRAM FILES\MICROCHIP\MPLAB IDE\ICD2\ABC.ASM 33 : Register in operand not in bank 0. Ensure that bank bits are correct. Halting build on first failure as requested. ---------------------------------------------------------------------- Debug build of project `D:\Program Files\Microchip\MPLAB IDE\ICD2\xyj.mcp' failed. Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01 Preprocessor symbol `__DEBUG' is defined. Target debug platform is `__MPLAB_DEBUGGER_ICD2=1'. Debug platform options are: `__ICD2RAM=1'. Wed Jun 09 19:55:20 2010 ---------------------------------------------------------------------- BUILD FAILED
;ABC.ASM 主要试验中断
;
;----
#INCLUDE<P16F684.INC>
;-----------------------
;
;
ORG 0X00
GOTO LOOP
;
ORG 0X04
;中断程序
;判断何种中断
BTFSS INTCON,T0IE
GOTO OTHER_INT
BTFSS INTCON,T0IF
GOTO OTHER_INT
;
BCF INTCON,T0IF
;
BCF STATUS,RP0
BSF PORTA,2;
NOP
NOP
BCF PORTA,2
OTHER_INT NOP
RETFIE
;
;
LOOP BANKSEL OPTION_REG
MOVLW B'00001000'
MOVWF OPTION_REG
BANKSEL INTCON
CLRF INTCON
BSF INTCON,T0IE
BSF INTCON,GIE
;
BCF STATUS,RP0
CLRF PORTA
;
LOOP1 NOP
NOP
NOP
GOTO LOOP1
;
end 展开
Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01 Preprocessor symbol `__DEBUG' is defined. Target debug platform is `__MPLAB_DEBUGGER_ICD2=1'. Debug platform options are: `__ICD2RAM=1'. Wed Jun 09 19:55:19 2010 ---------------------------------------------------------------------- Clean: Deleting intermediary and output files. Clean: Done. Executing: "D:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F684 "ABC.ASM" /l"ABC.lst" /e"ABC.err" /d__DEBUG=1 /d__MPLAB_DEBUGGER_ICD2=1 Error[113] D:\PROGRAM FILES\MICROCHIP\MPLAB IDE\ICD2\ABC.ASM 9 : Symbol not previously defined (LOOP) Error[121] D:\PROGRAM FILES\MICROCHIP\MPLAB IDE\ICD2\ABC.ASM 31 : Illegal label (LOOP) Message[302] D:\PROGRAM FILES\MICROCHIP\MPLAB IDE\ICD2\ABC.ASM 33 : Register in operand not in bank 0. Ensure that bank bits are correct. Halting build on first failure as requested. ---------------------------------------------------------------------- Debug build of project `D:\Program Files\Microchip\MPLAB IDE\ICD2\xyj.mcp' failed. Language tool versions: MPASMWIN.exe v5.30.01, mplink.exe v4.30.01 Preprocessor symbol `__DEBUG' is defined. Target debug platform is `__MPLAB_DEBUGGER_ICD2=1'. Debug platform options are: `__ICD2RAM=1'. Wed Jun 09 19:55:20 2010 ---------------------------------------------------------------------- BUILD FAILED
;ABC.ASM 主要试验中断
;
;----
#INCLUDE<P16F684.INC>
;-----------------------
;
;
ORG 0X00
GOTO LOOP
;
ORG 0X04
;中断程序
;判断何种中断
BTFSS INTCON,T0IE
GOTO OTHER_INT
BTFSS INTCON,T0IF
GOTO OTHER_INT
;
BCF INTCON,T0IF
;
BCF STATUS,RP0
BSF PORTA,2;
NOP
NOP
BCF PORTA,2
OTHER_INT NOP
RETFIE
;
;
LOOP BANKSEL OPTION_REG
MOVLW B'00001000'
MOVWF OPTION_REG
BANKSEL INTCON
CLRF INTCON
BSF INTCON,T0IE
BSF INTCON,GIE
;
BCF STATUS,RP0
CLRF PORTA
;
LOOP1 NOP
NOP
NOP
GOTO LOOP1
;
end 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询