Instant Interrupts - Revisited


Closed Thread
Results 1 to 40 of 773

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    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

  2. #2
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default

    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

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    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

  4. #4
    Join Date
    Jan 2006
    Posts
    31


    Did you find this post helpful? Yes | No

    Default Multiple interrupts

    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?

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by emavil View Post
    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

  6. #6
    Join Date
    Jan 2006
    Posts
    31


    Did you find this post helpful? Yes | No

    Default

    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?

  7. #7
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by emavil View Post
    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!!!

  8. #8
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by emavil View Post
    Now, my question is, what is really the minimum version of PBP just to compile your "multiple interrupt" codes?
    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.

    Quote Originally Posted by emavil View Post
    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?
    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

  9. #9
    Join Date
    Mar 2011
    Posts
    13


    Did you find this post helpful? Yes | No

    Default Re: Instant Interrupts - Revisited

    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:

    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'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.

    I get this odd error from the assembler that it cannot continue, as follows:
    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
    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.
    Last edited by R.G.Keen; - 10th March 2011 at 20:47. Reason: can't spell... 8-)

Similar Threads

  1. Clock using Instant Interrupts
    By PICpocket in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th February 2009, 21:43
  2. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 20:02
  3. DT's Instant Interrupts trouble
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 24th November 2008, 20:48
  4. Keypad and DT's Instant Interrupts
    By Homerclese in forum General
    Replies: 11
    Last Post: - 27th April 2007, 06:32
  5. Replies: 1
    Last Post: - 1st November 2006, 03:11

Members who have read this thread : 9

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts