I have a 128 x 64 oled screen that uses i2c, I have a library written for arduino and know enough to convert the methods etc. However I am stuck on the font description the font is stored in a two dimensional array of bytes. In progmem is there something similar in pic that won't impact ram too much I have 12th of program space but I don't think a constant array would do the right thing.
Many thanks in advance
Phil
store array of bytes
Re: store array of bytes
Flash seems the best choice to store fonts - why do you think a constant array is not a good solution?
Re: store array of bytes
Flash is that eeprom? I thought constants were inserted at compile time as a substitution of the word. I didn't think that the whole constant array would be stored in rom.
- marina.petrovic
- Posts: 2986
- Joined: 18 Apr 2013 08:11
Re: store array of bytes
Hi,
You can read more about constants in compiler Help file: mikroPascal PRO for PIC Language Reference -> Constants.
You can take a look at some example from compiler to see how we declared fonts in our projects (TFT fonts), for example:
...\mikroPascal PRO for PIC\Examples\Development Systems\mikromedia for PIC18FJ\Calculator)
In "Calculator_resources.mpas" file you can see that we declared fonts as const array.
Best regards,
Marina
You can read more about constants in compiler Help file: mikroPascal PRO for PIC Language Reference -> Constants.
You can take a look at some example from compiler to see how we declared fonts in our projects (TFT fonts), for example:
...\mikroPascal PRO for PIC\Examples\Development Systems\mikromedia for PIC18FJ\Calculator)
In "Calculator_resources.mpas" file you can see that we declared fonts as const array.
Best regards,
Marina
Re: store array of bytes
Hi Guys,
Thank you for the responses, very much appreciated.
Regards
Phil
Thank you for the responses, very much appreciated.
Regards
Phil