PDA

View Full Version : DT-INTERRUPT Example Elapsed Time



PickyBiker
- 15th April 2010, 21:51
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

ScaleRobotics
- 15th April 2010, 22:09
I think you need the newest version for Darrel's interrupts. It can be found here http://www.picbasic.co.uk/forum/showpost.php?p=82826&postcount=3

PickyBiker
- 15th April 2010, 22:27
You are correct sir. Interesting, you pointed me to a location with the DT-INT-18 that is newer than the one on his home page.

Thanks!