I am trying to use Darrel Taylor's great Instant Interrupts (thank you!) on a 12F part. Originally, I was using a 12F635. I changed to a 12F683 after reading posts about doing this, because I was under the impression it would work O.K. However, I still get the following message when compiling:
ERROR:Variable wsave2 position request 288 beyond RAM_END 191.
Do I still need to comment out some lines?
@ device pic12f683, INTRC_OSC_NOCLKOUT, WDT_OFF, MCLR_OFF, PROTECT_OFF
OPTION_REG = %11000000
OSCCON = %01100001
TRISIO = %001100
CMCON0 = %00000111
ANSEL = 0
CCP1CON = 0
RATESW VAR BYTE
HIGH GPIO.0
HIGH GPIO.1
HIGH GPIO.4
HIGH GPIO.5
pause 100
RATESW = 0
INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler INT_INT, _SWINT, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
INT_ENABLE INT_INT ; enable external (INT) interrupts
ENDASM
Main:
if ratesw = 1 then Rate1
if ratesw = 2 then rate2
if ratesw = 3 then rate3
if RATESW > 3 then RESET
GOTO Main
Rate1:
while ratesw = 1
LOW GPIO.0
low GPIO.1
pause 150
high GPIO.0
high GPIO.1
low GPIO.4
low GPIO.5
PAUSE 150
high GPIO.4
high GPIO.5
wend
Rate2:
while ratesw = 2
LOW GPIO.0
low GPIO.1
pause 100
high GPIO.0
high GPIO.1
low GPIO.4
low GPIO.5
PAUSE 100
high GPIO.4
high GPIO.5
wend
Rate3:
while ratesw = 3
LOW GPIO.0
low GPIO.1
pause 50
high GPIO.0
high GPIO.1
low GPIO.4
low GPIO.5
PAUSE 50
high GPIO.4
high GPIO.5
wend
RESET:
RATESW = 0
GOTO Main
GOTO Main
'---[INT - interrupt handler]---------------------------------------------------
SWINT:
while GPIO.2 = 0:wend
pause 100
if GPIO.2 = 1 then
RATESW = RATESW + 1
endif
@ INT_RETURN
Thank you
Bookmarks