Each ASCII character included in a SEROUT, LCDOUT, DEBUG or SEROUT2 takes at least two characters in program memory for each ASCII character in the string.
Keep any user prompts as terse as possible.
HTH
BrianT
Each ASCII character included in a SEROUT, LCDOUT, DEBUG or SEROUT2 takes at least two characters in program memory for each ASCII character in the string.
Keep any user prompts as terse as possible.
HTH
BrianT
This brings up an issue that I have long harped on.
Unless you are building a huge quantity of something, where the cost of the coding can be amortized across a large number of units, ALWAYS
Use an 18F part
Use a part that has at least twice the codespace you need.
And, if you want to know if you have exceeded any particular memory size, use
at the end of your program. The compiler will give you an error if you exceed the size given in the ORG statement.Code:ASM ORG 0x1fcee ; put your limit here nop ENDASM
Charles Linquist
Hi all,
Thank you all for your help. This post is an update for this thread. When giving the final touches to my program, I found out one more time that I was running out of programming memory space. Luckily, I was able to reduce the size of my program by almost 1K words. I don't know assembly so; this is how I did it.
Before, I was using only one variable I that was declared as a word for all my FOR I = ... NEXT I loops and whenever I needed a counter I = I + 1.
Sometimes the value of I went well over 255 but must of the times it didn't go over 255. So, I created a new variable J and declared it as a byte.Code:I VAR WORD
I replaced J by I wherever it was possible and BINGO, the size of the program went down by almost 1K words.Code:I VAR WORD J VAR BYTE
Again, Thank you all for your help.
Robert
Yes, I read that in the link that you posted earlier. Thank you.Also a 0 to x instead of 1 to x may help too in a for-next loop.
Ioannis
Robert
Bookmarks