Hi Rob,

On 2019/01/28 22:58, Rob Jansen wrote:

I need a large array for one of my applications and ran into the large array library which does exactly what I need. I am using a PIC16F1976 and I constantly ran out of data memory, even when defining an array of 200 bytes.

I had a look at the source code and I expect that this is caused by the fact that you define smaller arrays of 256 bytes but the PIC16F1976 does not have banks of that size but banks of at most 80 bytes.

Should I make a new large array library or should I try to adapt the current libraries so that they also work for chips that have banks of 80 bytes, so arrays of 64 bytes would be the easiest to work with.

If I add it to the existing libraries there are various options:
1) I check for the core type and make a separate part for those types of cores using arrays of 64 bytes. 2) Rewrite the library so that it is based on arrays of 64 bytes instead of 256 bytes and add more arrays to make it fit the original size.

Any suggestions?

I cannot find the 16F1976, I assume you mean the 16f19176.

Just an idea ... A third option could be to use data memory in 'linear' mode,  a special feature of the 14H core. This possibility has been subject of discussion here long ago. As far as I remember it was at that time seen as required new feature of the compiler. When implemented in a library I can imagine there may be a conflict with memory management by the compiler, because linear memory is simply an 'overlay' of banked memory.

Regards, Rob.


--
*Rob H*amerling, Vianen, NL

--
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/d/optout.

Reply via email to