DT_INT problem in 676


Closed Thread
Results 1 to 3 of 3
  1. #1

    Default DT_INT problem in 676

    I have installed the latest DT_INT files but my following code is giving problem.
    Without any variable declaration, it is showing out of memory....
    Code:
    Include "modedefs.bas"
    INCLUDE "DT_INTS-14.bas"     ; Base Interrupt System
    INCLUDE "ReEnterPBP.bas"     ; Include if using PBP interrupts
    DEFINE     NO_CLRWDT    1
    
    @ __Config _LP_OSC & _WDT_OFF & _PWRTE_ON & _MCLRE_OFF & _BODEN & _CP & _CPD
    
    PAUSE 50
    	TRISA = %000010
    	TRISC = %000000
    	CMCON = 7
    	ANSEL = 0
          	OPTION_REG = %10000111  ' RAPU = off, PS 1:256 to TMR0
    	PORTA=0
    	PORTC=0
    wsave   VAR BYTE    $20     SYSTEM      ' alternate save location for W
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
           INT_Handler    TMR1_INT,  _counting,   PBP,  yes
       endm
      INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    @   INT_ENABLE   TMR1_INT     ; enable external (INT) interrupts
    
    counting:
    
    @ INT_RETURN
    The error in the compiler window says:
    ERROR: Unable to fit variable RS2_SaveHalting build on first failure as requested.
    BUILD FAILED: Sat Dec 11 17:28:10 2010
    ___________________
    WHY things get boring when they work just fine?

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


    Did you find this post helpful? Yes | No

    Default

    PicBasic Pro uses 24-26 bytes for System Variables. (can be more)
    DT_INTS-14 needs 7 bytes to do ASM interrupts.

    And if you want PBP type interrupts ...
    ReEnterPBP needs to save all of PBP's system variables (26 bytes)
    Plus it uses another 8 bytes, just in case PBP creates more T? system vars.

    For a total of 65 bytes.
    But the 16F676 only has 64 bytes.
    __________________________________________________ _________________________

    If you only use ASM type interrupts, you'll have 31 bytes left for your variables.

    If you really need PBP type handlers, you can reduce the MaxTvars constant in ReEnterPBP which will get back a few bytes.
    reducing MaxTvars from 4 to 3 will allow your example above to compile.
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel, I have used your previous version of the INT as well without problems.
    Now, unfortunately I have deleted those previous files. Is there any way I can have access to the previous version of your INT files?
    ___________________
    WHY things get boring when they work just fine?

Members who have read this thread : 1

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

Posting Permissions

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