fatal error [301] out of memory with 4 lines of code????


Closed Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171

    Default fatal error [301] out of memory with 4 lines of code????

    I just got version picbasic Pro 2.46 and am trying to compile a 4 line code as a sample. however it comes up with this error:

    Fatal : 301 Out of memory

    the chip is set to a 16F88 and I'm using code designer lite, here is the code below - I'm gonna ad LCD and stuff later I was just trying to see if i could successfully program it.

    Thanks in advance for any suggestions


    @ DEVICE INTRC_OSC, WDT_OFF, MCLR_OFF

    DEFINE OSC 8
    DEFINE LCD_DREG PORTB
    DEFINE LCD_DBIT 4
    DEFINE LCD_RSREG PORTB
    DEFINE LCD_RSBIT 3
    DEFINE LCD_EREG PORTB
    DEFINE LCD_EBIT 2
    DEFINE LCD_COMMANDUS 2000

    DEFINE ADC_BITS 10 'Set number of bits in result
    DEFINE ADC_CLOCK 3 'Set clock source (3=rc)
    DEFINE ADC_SAMPLEUS 50 'Set sampling time in us

    TRISA = %00000001 'Set I/O
    TRISB = %00000000 'Set I/O
    CMCON = %00000111 'Disable analog comparators
    ANSEL = %00000001 'Set PORTA.0 analog rest digital
    ADCON1 = %10000000 'Right justify result
    OSCCON = %01110000 'Set internal osc to 8MHz

    Pause 500

    Start:

    PORTB.0 = 1
    Pause 500
    PORTB.0 = 0
    Pause 500

    GoTo start

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    http://www.microengineeringlabs.com/...4.htm#02070858

    what happen if you install MPASM and use it instead of PM or PBPW
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    might give it a go tomorrow thanks, but it's weird cos I've done quite big programs in the past and never had an such issue letalone turning a port on and off, the computer I'm using has 512MB ram - not way powerful but I would have thought good enough

  4. #4
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Default

    I've modified the code and ripped out everything except the "start: and Goto Start"

    It compiled with 4 words successfully - yay.

    However I need a program with a bit more in it than start and goto start.

    I tried on different chips but have the same problem - however when I use v2.42 it compiles fine. I've deleted v2.46 and reinstalled it however still no joy. So I'm assuming it's a problem with v2.46 but would think other people would have come across the same issue. I might also try on a diff computer tonight to see what happens.

    my biggest issue is that 2.42 doesn't support the 16F88
    Last edited by George; - 27th October 2005 at 04:05.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    maybe, i said maybe, the update patch could help. Look on the MELABS website for that.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Out of memory errors like this are normally due to using PBP.EXE instead of PBPW.EXE which is the Windows executable, and it handles memory much better than the DOS command line executable PBP.EXE.

    Be sure you're pointing your editor to PBPW.EXE VS PBP.EXE. Should cure the problem.

    I just got version picbasic Pro 2.46

    If you have an older version of PBP installed on the same machine, make sure your using the new version.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    Oct 2005
    Location
    New Zealand
    Posts
    171


    Did you find this post helpful? Yes | No

    Talking

    FIXT IT!!!

    With help from Charles at MeLabs,

    Under PBPW.EXE properties in windows, set compatibility to windows 98/me and all solved.

Similar Threads

  1. decoding quadrature encoders
    By ice in forum mel PIC BASIC Pro
    Replies: 93
    Last Post: - 28th February 2017, 09:02
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. Spooked code lines
    By POLA in forum General
    Replies: 1
    Last Post: - 27th March 2005, 20:40
  5. character lcd 4 lines
    By jojokatada in forum PBP Wish List
    Replies: 4
    Last Post: - 4th February 2005, 15:35

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