Banks related to memory problem?


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: Banks related to memory problem?

    Yup, always end your IFs before returning.

    Robert

  2. #2
    Join Date
    Jul 2013
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Re: Banks related to memory problem?

    Thanks for your help.

    I am assuming you are talking about the cases below where this problem occurs?

    I found this problem to occur once in the OACIS-Main code:

    if fButtonHold = 1 then 'If a button is being held, return to prevent too quick button responses.

    if MenuPage = 8 and fHoldEnable = 1 then 'Or if we are on page 8 force the Valve on holds
    if RightButton = 0 then 'but only if the code was put in to enable forcing.
    pEvapEEV = 1
    pBuzzer = 1
    elseif LeftButton = 0 then
    pEvapEEV = 0
    pBuzzer = 1
    endif
    'Update the display to reflect forced valve
    hserout2[$FE, $47, 20, 2, dec1(pEvapEEV)]
    endif

    return
    endif



    And in three locations in the PCB6_3 Setup.txt:

    if(AOValue > 1023) then AOValue = 1023 ; limit value
    if(AOValue < 0) then AOValue = 0
    if(AOCh > 7) then return ; limit value
    if(AOCh < 0) then return

    EEWRITE:
    if(EEAddress > 131071) then EEAddress = 131071 ; limit value

    ....

    return


    EEREAD:
    if(EEAddress > 131071) then EEAddress = 131071 ; limit value

    ....

    return

    • I'll see what I can do to fix these and then get back to you guys with whether or not that fixed the problem.

      Thanks again.









    • #3
      Join Date
      Jan 2005
      Location
      Montreal, Quebec, Canada
      Posts
      3,170


      Did you find this post helpful? Yes | No

      Default Re: Banks related to memory problem?

      Does this work?
      Code:
      Routine:
      If bla bla then goto exitroutine
      Bla
      Bla
      Bla
      Endif
      
      Exitroutine:
      Return
      If you use this in multiple routines, then just suffix with a number so the labels are unique.
      Robert

    Similar Threads

    1. Replies: 10
      Last Post: - 11th October 2011, 07:01
    2. Memory Problem
      By morphyn in forum mel PIC BASIC Pro
      Replies: 1
      Last Post: - 18th February 2009, 21:59
    3. How to select timeout related to buadrate for HSERIN ?
      By grich in forum mel PIC BASIC Pro
      Replies: 3
      Last Post: - 7th May 2008, 17:19
    4. 18F out of memory problem
      By tom in forum mel PIC BASIC Pro
      Replies: 5
      Last Post: - 23rd January 2007, 06:58
    5. All USB related topics should be posted here
      By NavMicroSystems in forum USB
      Replies: 0
      Last Post: - 11th July 2005, 12:51

    Members who have read this thread : 0

    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