After realizing that my flight controller needs real-time interrupts, I downloaded Darrel Taylor's DT-Interrupt-18 example, Hello World.
(The Title says "Elapsed Time' but it was really Hello World)
Nothing was modified, the int stuff was extracted to the c:\pbp directory, but it doesn't compile. I'm using an 18F252.
Here are the messages:
ERROR: Unable to execute mpasmwin.Error[116] C:\DOCUMENTS AND SETTINGS\MIKE\DESKTOP\MPLAB\TEST\TEST.ASM 538 : Address label duplicated or different in second pass (Z00015)
Error[116] C:\DOCUMENTS AND SETTINGS\MIKE\DESKTOP\MPLAB\TEST\TEST.ASM 601 : Address label duplicated or different in second pass (Z00016)
Error[116] C:\DOCUMENTS AND SETTINGS\MIKE\DESKTOP\MPLAB\TEST\TEST.ASM 654 : Address label duplicated or different in second pass (Z00017)
Error[116] C:\DOCUMENTS AND SETTINGS\MIKE\DESKTOP\MPLAB\TEST\TEST.ASM 685 : Address label duplicated or different in second pass (Z00018)
Here's the code;
LED1 VAR PORTB.1
INCLUDE "DT_INTS-18.bas" ; Base Interrupt System
INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
@ INT_ENABLE INT_INT ; enable external (INT) interrupts
Main:
PAUSE 1
GOTO Main
'---[INT - interrupt handler]---------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURN
Bookmarks