I'm having the same problem trying to fit a 7KB Table into 16F15376. The data sheet says it has 16KW of Program Flash memory. The program so far is the Table, and three tiny loops.
GCB still complains there is no room for the program, unless I shrink the table down below around 2000 elements.
Error: Subroutine TABLE1 is 7086 words, the size limit on the current chip
is 2048 words
Error: Program is too large, cannot fit all subroutines into available
program memory
The GCB documentations says "a list of numbers (up to 10,000 elements)", not mentioning that it can't hadle the spilt/page limitations etc. If this is true for certain chips, which might these be? -Just curious... :)
What would be the best solution fro the 16F15376? Split the table into many 255elements tables? or 2048 ?
Last edit: Roger Jönsson 2019-03-03
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you. The error is correct. One table (with it headers and footer) cannot exceed the page size on a 16f microcontroller.
Split the data into mulitple tables or (as I would) I would create a little converter to automatically split the data source with the little converter doing all the hard work in terms of ensure the table in the correct size with a method to manage the dataset.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't know if this is related to the page size limitation
(data sheet for 16F15376, page 107);
TABLE 5-1: BOOT BLOCK SIZE BITS
Actual Boot Block Size User Program Memory Size (words)
8192
I can't find any other information in the data sheet (lots of pages and not sucessful searching the content). Searching 2048 in the yeilds nothing useful.
Is 2048 limitation true for all 16F PICs?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having the same problem trying to fit a 7KB Table into 16F15376. The data sheet says it has 16KW of Program Flash memory. The program so far is the Table, and three tiny loops.
GCB still complains there is no room for the program, unless I shrink the table down below around 2000 elements.
Error: Subroutine TABLE1 is 7086 words, the size limit on the current chip
is 2048 words
Error: Program is too large, cannot fit all subroutines into available
program memory
The GCB documentations says "a list of numbers (up to 10,000 elements)", not mentioning that it can't hadle the spilt/page limitations etc. If this is true for certain chips, which might these be? -Just curious... :)
What would be the best solution fro the 16F15376? Split the table into many 255elements tables? or 2048 ?
Last edit: Roger Jönsson 2019-03-03
What version of Great Cow BASIC? look in the IDE to show the version or the top line of the as file.
Great Cow BASIC (0.98.<<>> 2019-02-14 (Windows 32 bit))
Example file attached. A test playing audio with PW output, just to see whats possible...
Last edit: Roger Jönsson 2019-03-03
Thank you. The error is correct. One table (with it headers and footer) cannot exceed the page size on a 16f microcontroller.
Split the data into mulitple tables or (as I would) I would create a little converter to automatically split the data source with the little converter doing all the hard work in terms of ensure the table in the correct size with a method to manage the dataset.
Ok. I can do the workaround, but I was curious.
I don't know if this is related to the page size limitation
(data sheet for 16F15376, page 107);
TABLE 5-1: BOOT BLOCK SIZE BITS
Actual Boot Block Size User Program Memory Size (words)
8192
I can't find any other information in the data sheet (lots of pages and not sucessful searching the content). Searching 2048 in the yeilds nothing useful.
Is 2048 limitation true for all 16F PICs?
The answer. :-) From my brain.
Where
It would be possible to resolve the table and page limitation using different strategies but this is not on the list of improvements. :-)
I see. :-)
It seems like 2048 hits the celiling as well, I guess there is some header stored as well, so the storable block size is slightly less?
Error: Subroutine TABLE1 is 2070 words, the size limit on the current chip
is 2048 words
Yes, there is a small header and footer to process the lookups.