PDA

View Full Version : PBP3 and DT Interrupts



rsocor01
- 5th March 2017, 04:59
Hi,

I just bought my license for PBP3 after many years using PBP2.60 :biggrin:. I have a program that works perfectly fine with PBP2.60, but apparently PBP3 doesn't like DT interrupts. I got a bunch of errors when trying to compile my code.

8387

Apparently, PBP3 doesn't like the DT Interrupt files. Can somebody please point me in the right direction? I did a search here in the forum, but didn't find anything related to this issue. Any help is appreciated.

Thanks,

Robert

rsocor01
- 5th March 2017, 07:37
Actually, I found the problem. The files DT_INTS-18.bas and ReEnterPBP-18.bas need to be included in the same folder with the pbp program. That resolved all the issues.

So far I'm pretty happy with the upgrade I did. My next step is to try the USB EasyHID with PBP3. Let's see how that goes. :confused:

Ioannis
- 6th March 2017, 11:21
It is not necessary to be in the same folder. If Include does show the correct path like this:

Include "C:\myprojects\DT18INTS\DT_INTS-18.bas"

you are good to go.

Let us know about USB explorations!

Ioannis

MOUNTAIN747
- 16th April 2022, 19:03
I have kickstarted this old thread because it had the same problem as I am having except my root cause is different, I think.

I have upgraded to PBP3 and MPLABX5.35.on WIN10

"PBP Tool Chain" is installed.

DT_INTS-14.bas and ReEnterPBP.bas are in the project directory.

MicroCode Studio, View, Compiler and Program Options-MPASMX Assembler is checked, Assembler Options- MPASM all checked.
Using 16F1936





define OSC 8
#CONFIG
__config _CONFIG1,_FOSC_INTOSC & _CLKOUTEN_OFF & _MCLRE_ON & _BOREN_OFF & _WDTE_OFF & _FCMEN_OFF & _CP_OFF & _CPD_OFF & _IESO_OFF
__config _CONFIG2, _WRT_OFF & _PLLEN_OFF & _STVREN_ON & _BORV_LO & _LVP_OFF
#ENDCONFIG

include "DT_INTS-14"
include "ReEnterPBP"
wsave var byte $70 SYSTEM
wsave1 var byte $A0 SYSTEM
wsave2 var byte $120 SYSTEM
wsave3 var byte $1A0 SYSTEM

;--[ Set Hardware ]---------
OSCCON=%01110000 ;OSCON/RICF@1111=16Mhz @1101=4Mhz @1110=8Mhz
OPTION_REG=%00000000
IOCBN = %00110100 'RB2-RB4 interrupts on neg going pulse
IOCBP = %11000000 'RB6 & RB7 unterrupts on positive going pulse
ASM
BANKSEL PORTA
CLRF PORTA
BANKSEL LATA
CLRF LATA
BANKSEL ANSELA
CLRF ANSELA
BANKSEL PORTB
CLRF PORTB
BANKSEL LATB
CLRF LATB
BANKSEL ANSELB
CLRF ANSELB
BANKSEL PORTC
CLRF PORTC
BANKSEL LATC
CLRF LATC
ENDASM
TRISA=%00000000
TRISB=%11111111
TRISC=%11111111
;--[ Set Varables ]---------
Avar var byte
Bvar var byte
Cvar var byte
Pulses var word 'Number of STEPs per RUN
Distance var byte 'Number of RUNs (Example - 100pulses(.5mm) per Run x (Distance of 10)= 5mm)

;---[Port variables}---
Buz var PortA.0 ' NOT YET PROGRAMED
Drive var PortA.1 ' Pulses out to drive Stepper Motor
Direction var PortA.2 '0=farward 1=reverse
Relay1 var PortA.3 ' contact white and yellow wire of AZ0318 camera trigger
Relay2 var PortA.4 ' Primary Trigger relay, white/yellow to Red
LEDx var PortA.5 '
ErrorLED var PortA.7 ' Red LED continuous blinker
;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ASM
INT_LIST macro ; IntSource, Label, Type, ResetFlag?
INT_Handler IOC_INT, _Runout, PBP, yes
endm
INT_CREATE
ENDASM
@ INT_ENABLE IOC_INT
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Start:

;more code here



after compile -

Warning: Unable to open INCLUDE file DT_UNTS-14
Warning: Unable to open INCLUDE file REENTERPBP

mpgmike
- 16th April 2022, 21:24
You omitted the .bas (or .pbp) suffix from your INCLUDEs.

MOUNTAIN747
- 16th April 2022, 22:23
OK, I think I found the problem. I had "DT_INTS-14" which seem to work in 2.60 but in PBP3 it must be "DT_INTS-14.BAS". More testing to be done.

Another thing, where is the thread explaining how to get rid of these advertisements that drive you crazy almost to the point of leaving the side for less troubling ground.

MOUNTAIN747
- 16th April 2022, 22:31
Thanks Mike, you beat me to the post by one min. That should solve the problem.
Wayne