Hi all,
anybody can understand why the below code works only commenting the first line ?
If I use DEFINE RESET_ORG the program hangs and does nothing.
Code:
' DEFINE RESET_ORG 3000h
include "declare.inc"
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 TMR1_INT, _Timer1_250mS_INT, PBP, yes
endm
INT_CREATE ; Creates the interrupt processor
ENDASM
@ INT_ENABLE TMR1_INT ; enable Timer1 interrupts
OSCCON =%100000 ; Primary oscillator, internal 8MHz
OSCCON2.0 =1
OSCTUNE.7 =1
T1CON =%110111 ; Timer1, 1:8 prescaler, 262mS Interrupt
INTCON.7=1 ; global int
INTCON.6=1 ; peripheral int
MyLoop:
Hserout2["Hello ... ",#x,13,10]
x=x+1
pause 500
goto MyLoop
Timer1_250mS_INT:
toggle led
@ INT_RETURN
Bookmarks