Hi, Ioannis
Compiles fine adding ...
to the top of your code ...Code:@ __CONFIG _LVP_OFF & _BODEN_ON & _CP_ALL & _MCLR_OFF & _PWRTE_ON & _WDT_ON & _INTRC_IO
and
just BEFORE the Interrupts setup ... ( why ??? good question !!!)Code:'***************************************************************************** 'Includes '***************************************************************************** INCLUDE "DT_INTS-14.bas" INCLUDE "ReEnterPBP.bas" '------------- INTERRUPTS SETUP --------------------- ASM INT_LIST macro; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _timer, PBP, yes INT_Handler RBC_INT, _in_triger, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM
It DIDN'T Compile placed at the top of program ... that's it
- also think to uncomment Wsave, Wsave1 .... etc. in DT INTs listing ....
Alain
Last edited by Acetronics2; - 20th April 2010 at 16:57.
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Alain, there is no problem here where the lines of includes are placed. Either on the very top or just before the macros... Are you sure about that?
Ioannis
Last edited by Acetronics2; - 20th April 2010 at 19:55.
Hi,
Yess .. I'm pretty sure !!!
I had an error raising ( Vars_Saved not defined ... but it was correctly defined in the listing ) .
but now I've also uncommented Wsaves and compiler has compiled fine once ... no more compiler errors appears, whatever line the "includes" are placed ...
a bit strange, but not the first strange thing I see with MCS ...
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I'm looking at a possible necessity to need to upgrade to PIC24's and above...
I use DT INST INT's with my PIC16's and PIC18's however it would be a royal pain to have to write my own interrupt system for PIC24's and above...
Is their any work being done on DT Ints at the moment?
Is their any plans for DT Int's?
Anyone working on DT int's in a team?
Thanks
I have done a lot of work on the PIC24F series using MikroElektronika dsPIC Basic compiler, and have had no issues with Interrupt or having to implement a DT_INT style system. Interrupts are handed well in the compiler, which I think is due to the way the improved architecture handles them. One you try the Peripheral Pin mapping in the 24 series its hard to go back !
The only issue I had was changing my coding style after years of working with PBP ! I still use PBP for all my 16F and 18F stuff, so don't shoot me down for promoting other peoples products !
Bill.
When compiling the attached file I get the attached error.
It drives me crazy....
Ioannis
Last edited by Ioannis; - 15th September 2010 at 20:41.
Your code compiles here without errors. PBP 2.60A
http://www.scalerobotics.com
Thanks all for the support.
Al.: We are testing the new DT-INTs version 1.10. Here as Darrel pointed out the wsave are set in the main program.
Darrel: You are correct in the Port change Interrupts. Ok, I have them corrected and the two errors went away. But no joy on Interrupts. It seems that they are never triggered.
The latest test code is this:
IoannisCode:DEFINE OSC 4 @Line1 = _DEBUG_OFF & _LVP_OFF & _FCMEN_OFF & _IESO_OFF & _BOR_OFF @Line2 = _CP_OFF & _MCLRE_ON & _PWRTE_ON & _WDT_ON & _XT_OSC @ __CONFIG _CONFIG1, Line1 & Line2 @ __CONFIG _CONFIG2, _WRT_HALF & _BOR40V OPTION_REG.0=1 'PSA0 PRESCALER SELECT 1:1 TO 1:256 OPTION_REG.1=1 'PSA1 OPTION_REG.2=1 'PSA2 OPTION_REG.3=1 'PRESCALER TO: 1->WDT, 0->TMR0 OPTION_REG.4=0 'T0SE SOURCE EDGE 1->H TO L, 0->L TO H OPTION_REG.5=0 'T0CS 1->FROM RA4, 0->FROM INT. CLOCK OPTION_REG.6=0 'INT EDGE SELECT 0->H TO L, 1->L TO H OPTION_REG.7=0 'PULL UP 1->DISABLE, 0->ENABLE adcon0=%01000000 '0 off adcon1=$80'6 off (all digitals) ansel=$01 anselh=$00 PORTA=%00000001:PORTB=%00010000:PORTC=%10000001:PORTD=0:PORTE=0 TRISC=$80:TRISD=0:TRISE=0 TRISA = %00000001 TRISB = %00010000 wsave VAR BYTE $20 SYSTEM ' location for W if in bank0 ;wsave VAR BYTE $70 SYSTEM ' alternate save location for W ' if using $70, comment wsave1-3 clear INCLUDE "c:\projects\picdem2\DT_INTS-14.bas" INCLUDE "c:\projects\picdem2\ReEnterPBP.bas" '------------- VARIABLES --------------------- code_in var portb.4 '------------- VARIABLES ---------------------- t1con=%00000000 '65,535ms interrupt time base clear goto main '------------- INTERRUPTS SETUP --------------------- IOCB=%00010000 'Enable IOC on PortB.4 WPUB=%00010000 'Enable weak pull up on PortB.4 ASM INT_LIST macro; IntSource, Label, Type, ResetFlag? INT_Handler RBC_INT, _IOC2, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM @ INT_ENABLE RBC_INT ; Enable Port B on change '------------- INTERRUPTS SETUP --------------------- IOC2: if code_in then high portb.0 else low portb.0 endif @ INT_RETURN main: while 1 toggle portb.2 pause 100 wend End
Ioannis,
Remove the second CLEAR statement, and move the GOTO Main after the interrupt declaration, just before the IOC2: handler.
The interrupt declaration and the IOCB/WPUB must be allowed to execute.
DT
Bookmarks