Hello.
In my code I have to store a lot of textual variables inside code memory. For example:
Code:
if cvladi=1 then arraywrite botline, ["Rainbow "]
if cvladi=2 then arraywrite botline, ["Sunset "]
if cvladi=3 then arraywrite botline, ["Amsterdam "]
if cvladi=4 then arraywrite botline, ["Fire "]
if cvladi=5 then arraywrite botline, ["Jet engine "]
Each arraywrite statement here, when writing 16 bytes of data into array, consumes 46 bytes of code memory when compiled.
I do not have technical capabilities to attach external EEPROM or replace the main IC at this moment. The PIC I'm using is 16F1939 with 16K of program memory. I have to do a lot of arraywrites of 16 bytes of data - 146 times in whole program, so, 6716 bytes are used instead of 2336, is there a way to somehow compact all this, considering existing hardware limitations?
Bookmarks