I have a fair amount of experience with MPLab and PBP. I'm trying to hook up instant interrupts, and have run into an odd situation. I've pored through the ASM file, source file, compiler and assembler manuals, and the MPLab info, and searched on line, including here. I'm sure it's simple and I'll slap my own forehead when someone points it out, but ... well, if you can supply a pointer, I'd be grateful.
I'm trying to compile the instant interrupts "BlinkyLight" program, which is as follows:
Code:
' ================================
' this Blinky Light program will continue Blinking at the same rate, no
' matter what else you add to the Main: program loop.
LED1 VAR PORTB.1
INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler TMR1_INT, _ToggleLED1, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
T1CON = $31 ; Prescaler = 8, TMR1ON
@ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts
Main:
PAUSE 1
GOTO Main
' ---[TMR1 - interrupt handler]--------------------------------------------------
ToggleLED1:
TOGGLE LED1
@ INT_RETURN
' ======================================
I'm running MPLab v8.60 with PBP 2.60a. I have used this setup to successfully compile to HEX other programs in PBP. MPASM is the assembler, and I'm using the 110 level of instant interrupts.
I get this odd error from the assembler that it cannot continue, as follows:
Code:
Executing: "C:\PBP\PBPMPLAB.BAT" -p16F628A -ampasmwin -k# "BlinkyLight1.bas"
Executing: "C:\PBP\PBPW.EXE" -p16F628A -ampasmwin -k# "BlinkyLight1.bas"
PICBASIC PRO(TM) Compiler 2.60A, (c) 1998, 2010 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Error[101] E:\AVS\V2 DEVT\DUAL DELAY\BLINKYLIGHT1.ASM 231 : ERROR: (wsave variable not found,)
Error[101] E:\BLINKYLIGHT1.ASM 195 : ERROR: (" Add:" wsave VAR BYTE $70 SYSTEM)
Error[101] E:\BLINKYLIGHT1.ASM 252 : ERROR: (Chip has RAM in BANK1, but wsave1 was not found.)
Error[101] E:\BLINKYLIGHT1.ASM 202 : ERROR: (" Add:" wsave1 VAR BYTE $A0 SYSTEM, Or change to wsave BYTE $70 SYSTEM)
Error[101] E:\BLINKYLIGHT1.ASM 268 : ERROR: (Chip has RAM in BANK2, but wsave2 was not found.)
Error[101] E:\BLINKYLIGHT1.ASM 209 : ERROR: (" Add:" wsave2 VAR BYTE $120 SYSTEM, Or change to wsave BYTE $70 SYSTEM)
BUILD FAILED: Thu Mar 10 13:21:14 2011
It looks like the problem is in assembling the instant interrupts code - I think. I clearly have something set up wrong, but what?? Just point me in the direction and I'll go find it.
Bookmarks