PDA

View Full Version : PIC16F690 Lookup Error



RunningMan
- 14th March 2007, 03:23
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.

sougata
- 14th March 2007, 04:27
Hi,

Please post the compilation errors you are getting.

RunningMan
- 14th March 2007, 04:44
here you go

sougata
- 14th March 2007, 11:29
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.

RunningMan
- 14th March 2007, 18:57
I am compiling using MPASM in Microcode Studio with PBP 2.47

sougata
- 15th March 2007, 10:45
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.

RunningMan
- 15th March 2007, 23:54
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.

skimask
- 16th March 2007, 06:11
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...

mister_e
- 16th March 2007, 16:23
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.

sougata
- 17th March 2007, 05:09
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! :D

Acetronics2
- 17th March 2007, 11:11
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 ...