See this page...
DT_INTS-14 (Timer Template)
http://darreltaylor.com/DT_INTS-14/TimerTemplate.html
It's in the 14-bit section, but it's pretty much the same for 18F's
<br>
See this page...
DT_INTS-14 (Timer Template)
http://darreltaylor.com/DT_INTS-14/TimerTemplate.html
It's in the 14-bit section, but it's pretty much the same for 18F's
<br>
DT
Interrupt now OK with one time adjustable Hz.
Is their a way to change a Hz variable before each interrupt on?
wFREQ_Hz var word
Something like:
;--- Change these to match the desired interrupt frequency -------------------
;--- See http://DarrelTaylor.com/DT_INTS-14/TimerTemplate.html for more Info.
;@Freq = 10 ; Frequency of Interrupts in Hz
@Freq = wFREQ_Hz ; in assembly
I don't have anything ready-made for DT_INTs like that.
But this program has a routine to calculate the timer ticks required to produce a given frequency at a given dutycycle.
Slow speed Software PWM
http://www.pbpgroup.com/modules/wfse...hp?articleid=6
Just use the SetSPWM and CalcSPWM routines.
The interrupt portion isn't compatible with DT_INTS.
HTH,
DT
Hi darrel,
This is my follow up inquiry about your excellent code for multiple interrupts.
I've seen your code and it was amazing. After compiling, Microcode studio locked up. I'm using PIC16F628A, 4MHz xTAL and PICBasic Pro v2.33.
Your site states that MPASM is required. Does it have any relevance to the compilation?
Besides the fact that it won't work without it. No.
Hmmm, PBP V2.33
There's been at least a hundred different things fixed with PBP since that version from Several years ago.
There's no telling what could be going wrong with such an ancient compiler.
Time to spend the 10 bucks for an upgrade.
DT
thanks a lot for that reply.
I have also this notion that its really the PBP Compiler that limits me from utilizing your code. thank you very much.
With regard to PBP 2.33. I managed to enable the feature of 16F628A coz if we look at the installation files, only 16F628 is present.
Now, my question is, what is really the minimum version of PBP just to compile your "multiple interrupt" codes?
You said 10 bucks, with all your respect, can you let me have that upgrade for that amount. I'm just a hobbyist and purchasing a new PBP compiler by far costly for me? What are the possible solutions can you suggest?
Hey PAL....Let me give you a little hint...
WE'RE ALL JUST HOBBYISTS!!!
What makes you so special? And it's 10 bucks. If you can't afford that, then you probably shouldn't be buying any more hardware until you can save up that amount.
Oh...but you're looking at buying the new PBP compiler...which means that you can't upgrade.
Why can't you upgrade? Is this because the version you have right now isn't exactly....oh nevermind...I give up...
Another one for the list...
Last edited by skimask; - 22nd March 2007 at 03:59. Reason: $10 for upgrade...$25 for upgrade plus manual...duh!!!
My first version of PBP was 2.40, and that had to be 6 or 7 years ago. I don't know of anything that would keep DT_INTS from working with that. But 2.33, geez how many years ago was that. There's just no way of knowing if anything would work with it.
I'm not a PBP reseller, which are the only ones that can sell you an upgrade. And to do that, they would have to have sold PBP to you in the first place.
If you can't afford the price of the compiler, then you've chosen the wrong hobby. Because you'll be spending hundreds, if not thousands on the different parts, modules, processors, displays etc. The compiler itself is a relatively small cost, comparatively.
And you'll find that the people that did pay for the compiler, aren't willing to help someone that's pirated theirs. Sorry, but that includes ME.
<br>
DT
I have a fair amount of experience with MPLab and PBP. I'm trying to hook up instant interrupts, and have run into an odd situation. I've pored through the ASM file, source file, compiler and assembler manuals, and the MPLab info, and searched on line, including here. I'm sure it's simple and I'll slap my own forehead when someone points it out, but ... well, if you can supply a pointer, I'd be grateful.
I'm trying to compile the instant interrupts "BlinkyLight" program, which is as follows:
I'm running MPLab v8.60 with PBP 2.60a. I have used this setup to successfully compile to HEX other programs in PBP. MPASM is the assembler, and I'm using the 110 level of instant interrupts.Code:' ================================ ' this Blinky Light program will continue Blinking at the same rate, no ' matter what else you add to the Main: program loop. LED1 VAR PORTB.1 INCLUDE "DT_INTS-14.bas" ' Base Interrupt System INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts ASM INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler TMR1_INT, _ToggleLED1, PBP, yes endm INT_CREATE ; Creates the interrupt processor ENDASM T1CON = $31 ; Prescaler = 8, TMR1ON @ INT_ENABLE TMR1_INT ; enable Timer 1 interrupts Main: PAUSE 1 GOTO Main ' ---[TMR1 - interrupt handler]-------------------------------------------------- ToggleLED1: TOGGLE LED1 @ INT_RETURN ' ======================================
I get this odd error from the assembler that it cannot continue, as follows:
It looks like the problem is in assembling the instant interrupts code - I think. I clearly have something set up wrong, but what?? Just point me in the direction and I'll go find it.Code:Executing: "C:\PBP\PBPMPLAB.BAT" -p16F628A -ampasmwin -k# "BlinkyLight1.bas" Executing: "C:\PBP\PBPW.EXE" -p16F628A -ampasmwin -k# "BlinkyLight1.bas" PICBASIC PRO(TM) Compiler 2.60A, (c) 1998, 2010 microEngineering Labs, Inc. All Rights Reserved. ERROR: Unable to execute mpasmwin.Error[101] E:\AVS\V2 DEVT\DUAL DELAY\BLINKYLIGHT1.ASM 231 : ERROR: (wsave variable not found,) Error[101] E:\BLINKYLIGHT1.ASM 195 : ERROR: (" Add:" wsave VAR BYTE $70 SYSTEM) Error[101] E:\BLINKYLIGHT1.ASM 252 : ERROR: (Chip has RAM in BANK1, but wsave1 was not found.) Error[101] E:\BLINKYLIGHT1.ASM 202 : ERROR: (" Add:" wsave1 VAR BYTE $A0 SYSTEM, Or change to wsave BYTE $70 SYSTEM) Error[101] E:\BLINKYLIGHT1.ASM 268 : ERROR: (Chip has RAM in BANK2, but wsave2 was not found.) Error[101] E:\BLINKYLIGHT1.ASM 209 : ERROR: (" Add:" wsave2 VAR BYTE $120 SYSTEM, Or change to wsave BYTE $70 SYSTEM) BUILD FAILED: Thu Mar 10 13:21:14 2011
Last edited by R.G.Keen; - 10th March 2011 at 20:47. Reason: can't spell... 8-)
Bookmarks