Hello Demon.
here is the code. It does not show any errors for the main code but the DT interrupts when assembled gives the error code listed above.
and this is the Interrupt code from DT's Interrupts.Code:CLEAR 'Clears memoryinclude "codesize.pbp" 'measure the size of the code. Define Measure 1 '..... If any of these next three lines cause an error '......Comment them out to fix the problem... '......which variables are needed, depends on the chip you are using....... wsave1 var byte $A0 system ;location for W if in bank0 wsave2 var byte $120 system ;location for W if in bank0 wsave3 var byte $1A0 system ;location for W if in bank0 INCLUDE "DT_INTS-18-k80.bas"; Basic Interrupt System INCLUDE "ReEnterPBP-18.bas" ; Include if using PBP interrupts 'INCLUDE "ReEnterPBP-18LP.bas" ; Include if using Low Priority. PBP INTS INCLUDE "modedefs.bas" 'defines modes for serial in and out INCLUDE "ProfileGen3.pbp" 'Motion profile generator for motor move INCLUDE "incPIDv1_5.pbp" 'include the PID controller INCLUDE "CANBus.pbp" 'CAN bus header file ' Define clock speed DEFINE OSC 20 ' clock frequency DEFINE USE_HIGHPRIORITY 1 ' use high priority interrupts 'define USE_LOWPRIORITY 1 ' not using low priority interrupts DEFINE WRITE_INT 1 '********************************************************************* ' have to define this so interrupts are masked when doing EEPROM ' writes. It handles masking and un-masking '********************************************************************* INTCON2.6 = 0 ' Int on falling edge ' External Interrupt 0 Edge Select bit ' Set up data direction registers for all the pins. TRISA = 111111 ' Set PORTA RA6 is Osc output to crystal TRISB = 101001 ' Set PORTB TRISC = 010100 ' Set PORTC TRISD = 000011 ' Set PORTD TRISE = 111011 ' Set PORTE only lower 4 bits available ;----[High Priority Interrupts]---------------------------------------- ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ClockCount, PBP, yes ;-- Timer Int. INT_Handler INT0_INT, _MoveCmd, PBP, yes ;-- Flap Switch endm INT_CREATE ; Creates High Priority interrupt processor ENDASM
The error is for the INTHAND not being defined but, as you can see it is.Code:'****************************************************************'* Name : DT_INTS-18-K80.bas * '* Author : Darrel Taylor modified for PIC18F46K80 * '* Notice : Copyright (c) 2003 * '* Version : 1.0 MAR 21, 2022 * '* Date : MAR 21, 2022 * '**************************************************************** '* Versions: * '* 1.0 : MAR 21, 2022 first version modified for PIC66K80 * '* 3.3 : MAR 24, 2008 * '* Corrects an initialization problem affecting the * '* first pass if CLEAR is not used * '* 3.2 : Aug 26, 2007 * '* Update for PBP 2.50 using LONG's with PBPL * '* Added many new INT sources * '* 3.1 : JUL 18, 2006 * '* Modified to handle smaller BANKA in the newer chips* '**************************************************************** ;DISABLE DEBUG DEFINE INTHAND INT_ENTRY_H ' Context saving for High Priority Ints DEFINE INTLHAND INT_ENTRY_L ' Context saving for Low Priority Ints wsave var byte BANKA SYSTEM ' location for WREG ssave var byte BANK0 SYSTEM ' location for STATUS register bsave var byte BANK0 SYSTEM ' location for BSR register psaveUH VAR BYTE BANK0 SYSTEM ' PCLATU Hi Pri. psaveUL VAR BYTE BANK0 SYSTEM ' Lo Pri. psaveH VAR BYTE BANK0 SYSTEM ' PCLATH Hi Pri. psaveL VAR BYTE BANK0 SYSTEM ' Lo Pri. fsave0H var WORD BANK0 SYSTEM ' locations for FSR registers fsave1H var WORD BANK0 SYSTEM fsave2H var WORD BANK0 SYSTEM fsave0L var WORD BANK0 SYSTEM ' low priority FSR locations fsave1L var WORD BANK0 SYSTEM fsave2L var WORD BANK0 SYSTEM RetAddrH VAR BYTE[3] BANKA SYSTEM ' 21-bit return address Hi Pri. RetAddrL VAR BYTE[3] BANKA SYSTEM ' Lo Pri. INT_Flags VAR BYTE BANKA SYSTEM Serviced_H VAR INT_Flags.0 Serviced_L VAR INT_Flags.1 InHPint VAR INT_Flags.2 NoPriority VAR INT_Flags.3 INT_Flags = 0 goto OVER_DT_INTS_18 ASM ;____ Check for PBPL (PBP ver. 2.50 and above only)__________________________ PBPLongs_Used = 0 if (R1 - R0 == 4) PBPLongs_Used = 1 ; messg PBPL Used = 1 endif ; nolist ;____ DEFINE available interrupt sources_____________________________________
Thanks,
Paul


Reply With Quote

Bookmarks