Hi, Darrel,
I Ported it to MCS ...
ERROR : MACRO BUFFER OVERFLOW ...
Which looks sililar to the error MPASM raised.
??????????
Alain
Hi, Darrel,
I Ported it to MCS ...
ERROR : MACRO BUFFER OVERFLOW ...
Which looks sililar to the error MPASM raised.
??????????
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 " !!!
*****************************************
HI,Darrel,
a special character compiler do not like ???
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 " !!!
*****************************************
************************************************** ***********************
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 " !!!
*****************************************
Hi,
Result is the same with " T-Elapsed_18" ... straight out of the Package ...
Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPMPLAB.BAT" -ampasmwin -k# -p18F452 "T_Elapsed-18.bas"
Executing: "C:\Program Files\Microchip\MPLAB IDE\PBP\PBPW.EXE" -ampasmwin -k# -p18F452 "T_Elapsed-18.bas"
PICBASIC PRO(TM) Compiler 2.60, (c) 1998, 2009 microEngineering Labs, Inc.
All Rights Reserved.
ERROR: Unable to execute mpasmwin.Message[301] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PBP\18F452.INC 23 : MESSAGE: ( PENSEZ à INDIQUER la BONNE CONFIGURATION ... )
Message[301] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PBP\18F452.INC 24 : MESSAGE: ( PENSEZ à INDIQUER la BONNE CONFIGURATION ... )
Error[116] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\T_ELAPSED-18.ASM 609 : Address label duplicated or different in second pass (Z00022)
Error[116] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\T_ELAPSED-18.ASM 672 : Address label duplicated or different in second pass (Z00023)
Error[116] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\T_ELAPSED-18.ASM 725 : Address label duplicated or different in second pass (Z00024)
Error[116] C:\PROGRAM FILES\MICROCHIP\MPLAB IDE\PROJETS\T_ELAPSED-18.ASM 756 : Address label duplicated or different in second pass (Z00025)
Halting build on first failure as requested.
BUILD FAILED: Fri Aug 21 12:08:46 2009
************************************************** ***********************
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 " !!!
*****************************************
Strange thing ...
DT 14 bits interrupts Examples Compile fine ( With MPLAB ), but NOT 16 bits interrupts Examples ...
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 " !!!
*****************************************
No wonder I don't like MPLAB.
The problem seems to have something to do with the -k# command line option. (new option for pbp2.60)
If I use the same batch file that MPLAB uses ... PBPMPLAB.BAT
Then this command gives me the same errors you reported.If I remove the -k# option it compiles fine.c:\PIC\PBP260\PBPMPLAB.BAT -ampasmwin -k# -p18F452 "Tracteur.bas"
I haven't found a way to remove it from within MPLAB.
And I think if you did, you wouldn't be able to debug in MPLAB.
Added: In the PBP manual it only shows -k- and -k+. -k# doesn't even seem to be a valid option.
Not that it matters much, because it fails with either -k- or -k+ too.
Last edited by Darrel Taylor; - 22nd August 2009 at 02:15. Reason: -k+-
DT
I see exactly what's happening now.
This is one for meLabs to solve.
In an attempt to produce the COFF information for debugging with MPLAB, ... PBP with the -k option places Z????? Labels on every line of code ... including the "ASM" or @ lines.
If the program has any ASM macros in it (like DT_INTS), you can normally jump in and out of ASM anytime you need to within that macro.
But with it putting labels at the "ASM" statements, ... when those macros get used (more than once) it duplicates labels that were not in the original program.
For instance with this macro ...I'll send a report to support at melabs.comCode:ASM MyMacro macro ; asm statements here ENDASM ; PBP statements here ASM ; This statement creates a label in the middle of a macro. endm ENDASM @ MyMacro ; The first time it's used is OK @ MyMacro ; the second time or more duplicates that label
DT
************************************************** ***********************
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've been wondering what it would take...or if anyone has managed to change the Timereload (External Constant), to a variable that can be altered in the main program...
Actually, I would like to load this value from eeprom on startup, but I am at a loss for how to go about this short of learning asm...
;---Reload Timer1------ (T1 asm interrupt handler)
ASM
ReloadTMR1
MOVE?CT 0, T1CON, TMR1ON ; 1 stop timer
MOVLW LOW(TimerReload) ; 1 Add TimerReload to the
ADDWF TMR1L,F ; 1 value in Timer1
BTFSC STATUS,C ; 1/2
INCF TMR1H,F ; 1
MOVLW HIGH(TimerReload) ; 1
ADDWF TMR1H,F ; 1
MOVE?CT 1, T1CON, TMR1ON ; 1 start timer
INT_RETURN
ENDASM
I'm sure there are a number of ways to do it, but a direct translation of that routine might look like this ...Then TimerReload is a PBP word variable.Code:TimerReload VAR WORD BANK0 ASM ReloadTMR1 MOVE?CT 0, T1CON, TMR1ON ; 1 stop timer MOVF _TimerReload,w ; 1 Add TimerReload to the ADDWF TMR1L,F ; 1 value in Timer1 BTFSC STATUS,C ; 1/2 INCF TMR1H,F ; 1 MOVF _TimerReload + 1,w ; 1 ADDWF TMR1H,F ; 1 MOVE?CT 1, T1CON, TMR1ON ; 1 start timer INT_RETURN ENDASM
You can calculate it or read it from EEPROM as desired.
DT
Thanks Darrel! works great!
I've been experimenting with the interrupt system lately and although its not relevant for my purposes, I noticed something I can't explain...
I'm guessing it has something to do with the port variables saved...
I have a pic12f683
Led1 GPIO.1 toggled by 1Hz Timer1 interrupt (...in my case via external crystal)
Led2 GPIO.2 toggled by IOC/RB interrupt.
The RB interrupt also starts or stops the timer...allowing for control of the blinking LED1. This part works however LED2 only turns off briefly when the button is pressed.
Things work normal if a flag bit is "toggled" and the Leds are controlled in the main program...
Code:RBPortIntPBP: 'toggle gpio.2 if T1CON.0 = 0 then TOGGLEFLAG = 1 'attempt doing this via main handler else TOGGLEFLAG = 0 endif pause 300 @ INT_RETURN
Can anyone explain, and is there away to do this from within the handler?
Bookmarks