PIC16F690 Lookup Error


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2007
    Posts
    9

    Default PIC16F690 Lookup Error

    Hi all:

    I am using a 16F690 with 4K word of code space and am running into an issue using more than 4 lookup tables with 255 values each.

    I am compiling to 2652 words, but the compiler is spitting out errors like mad. I have searched like mad on the forum for a workaround but I am not having any luck..

    if I back down to 4 lookup tables the errors go away.

    Can anyone point me to a workaround on the forum? I am lost.

  2. #2
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Can we have some of that spit ?

    Hi,

    Please post the compilation errors you are getting.
    Regards

    Sougata

  3. #3
    Join Date
    Jan 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default Compilation Errors

    here you go
    Attached Images Attached Images  

  4. #4
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Are you using any org directive

    Hi,

    It seems that the code is compiling past the maximum available memory. The warnings should not cause panic. Have you tried using MPASM ?
    As large files are compiled and then
    assembled, they may start to use more than the first page. As each
    page is used, PM, the assembler, will issue a message that the code is
    crossing a particular boundary. This is normal and no cause for alarm.
    PBP will make sure to take care of most of the issues for you.
    However a look at your entire code may give some insight as to why it is crossing the maximum usable prog mem or if it is just a warning.
    Regards

    Sougata

  5. #5
    Join Date
    Jan 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default 16F690 Lookup Issue

    I am compiling using MPASM in Microcode Studio with PBP 2.47

  6. #6
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Can you post your code

    Hi,

    I can try compile and tweak if you post your code. What happens if you remove some code (say a subroutine) to test if it compiles okay.
    Regards

    Sougata

  7. #7
    Join Date
    Jan 2007
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Any additional thoughts here? MElabs told me that the tables were basically gobbling up code space and I should try moving stuff around...I tried a couple things and that was to no avail.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by RunningMan View Post
    Any additional thoughts here? MElabs told me that the tables were basically gobbling up code space and I should try moving stuff around...I tried a couple things and that was to no avail.
    Post the code...let's have a look-see...maybe some of us more experienced types might be able to show you something to save some code space or something...

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


    Did you find this post helpful? Yes | No

    Default

    To me an external EEPROM is the way to go to store Lookup tables.

    As long as your value range<127, you could also use MPASM da

    If you're using tons of Text string in your code, there's different way to shrink it as well.

    Post your code here, maybe we can see something to improve.
    Steve

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

  10. #10
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Post the code to get any possible help

    Hi,

    I guess that this is a commercial project and you cannot post it publicly. However without the code it is difficult to give any pointer's. May be Steve's crystal ball can do something!
    Regards

    Sougata

  11. #11
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,651


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi, Runningman

    Something interesting would be co compile with 4 tables and have a look to the MPLAB Program Window, to find WHERE the tables are located / pages beginnings in the Hex file ...

    That could enlighten the reason Why ....

    Just a small idea ... !!!

    Alain ... Great "RTLW" user ( in assembler only !!! )

    PS: "RTLW" is your solution also ...
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Using input from Switch to control a loop
    By MrRoboto in forum mel PIC BASIC
    Replies: 9
    Last Post: - 2nd February 2009, 05:02
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. Optimizing DIV
    By skimask in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 22nd September 2008, 04:58
  4. problem with USART
    By leemin in forum Serial
    Replies: 4
    Last Post: - 11th December 2006, 17:56
  5. 16F88 Compile error
    By Toley00 in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 2nd November 2005, 00:22

Members who have read this thread : 0

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