PDA

View Full Version : Problem using Instant Interrupts



Jerson
- 3rd May 2006, 15:14
Hello

I have downloaded the Instant interrupts example files and trying to compile them with no luck. Perhaps Darrell / Tim can enlighten me as to how to get it going?

This is the file I am trying to get to work.


INCLUDE "DT_INTS-14.bas"
INCLUDE "ReEnterPBP.bas"
INCLUDE "Elapsed_INT.bas" ; Elapsed Timer Routines

ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _ClockCount, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor

INT_ENABLE TMR1_INT ; Enable Timer 1 Interrupts
ENDASM

GOSUB ResetTime ' Reset Time to 0d-00:00:00.00
GOSUB StartTimer ' Start the Elapsed Timer

Main:
IF SecondsChanged = 1 THEN
SecondsChanged = 0
LCDOUT $FE,2, DEC Days,"d-",DEC2 Hours,":",DEC2 Minutes,":",DEC2 Seconds
ENDIF
GOTO Main

This is the error I see (from the .lst file)


617 INT_LIST macro ; IntSource, Label, Type, ResetFlag?
618 INT_Handler TMR1_INT, _ClockCount, PBP, yes
619 endm
620 INT_CREATE ; Creates the interrupt processor
+ 019F- 29B8 goto @@0000
+ 01A0- 0804 movf FSR,W ; 7 move FSR reg to be saved into W reg
+ 01A1- 00B6 movwf fsave ; 8 save FSR reg to a bank 0 register
+ 01A2- 12DE bcf _Seviced
E[224] LOCAL Directive Only for Use in Macros
E[225] Undefined Symbol 'IflagReg'
E[226] Numeric Constant or Symbol Name Expected
E[201] ')' Expected
E[225] Undefined Symbol 'IflagReg'
E[226] Numeric Constant or Symbol Name Expected
E[201] ')' Expected

Setup I use is PBP2.46 to generate the ASM and Pasm4.07 to assemble it to Hex. The command lines I use are
PBPW -p16f917 test.bas
PM -l test

I just cant figure out why the Local is troubling the assembler

Jerson

Bruce
- 3rd May 2006, 15:36
You need to use the MPASM assembler. Look under Command Line Options in
your PBP manual.

PBPW -p16f917 test.bas ' <<-- this uses the default PM assembler, and will
return the errors you're seeing now.

Jerson
- 3rd May 2006, 17:35
Hey Bruce

Thank you very much. You were bang on.

Jerson