Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

How to use fonts stored in Eeprom

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
Yokablasta

Bascom Member



Joined: 13 Dec 2017
Posts: 19

PostPosted: Wed Oct 10, 2018 7:12 pm    Post subject: How to use fonts stored in Eeprom Reply with quote

I\\\'ve got a fairly large program written on an Atmega128a. It\\\'s got a lot of sliders and a small OLED display. I\\\'ve been having issues where the program won\\\'t compile due to SRAM space. So far I\\\'ve eliminated unused characters from my large fonts, which helped quite a bit, and I got rid of the .bgf splash screen. I\\\'m still having the issue though, as the program nears completion. It seems like the thing that really caused issues is the strings that use the 12x16 font. Would it make sense to place the fonts and strings in eeprom? How does a font file work when it\\\'s in eeprom? I\\\'ve been trying to find a concrete example of code where someone has done that. Is there anything else I should be doing to cut down on SRAM use? Any tips are appreciated. Thanks.
-R

(BASCOM-AVR version : 2.0.8.1 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5003
Location: Holland

blank.gif
PostPosted: Wed Oct 10, 2018 8:18 pm    Post subject: Reply with quote

i think you confuse sram and flashrom.
you will not get more sram space when stripping fonts.

which lcd driver do you use?
was it included with bascom or was it a third party driver?

the eeprom is small, you will not gain much by storing fonts there. but depending on the data you need to display, there are tricks to shrink down fonts.
especial a big font uses a lot of space.

another simple solution is to move to a mega256

_________________
Mark
Back to top
View user's profile Visit poster's website
Yokablasta

Bascom Member



Joined: 13 Dec 2017
Posts: 19

PostPosted: Wed Oct 10, 2018 10:17 pm    Post subject: Reply with quote

I am using an I2C 64 x 128 OLED display with the \"glcdSSD1306-I2C.lib\". Basically, I have a bunch of data tables after the end of my code that I use to look up the text string associated with each parameter. Once the string has been fetched, I use Lcdat 1,1, mystring to display the text.
I keep having issues programming the chip when I use the large fonts. I noticed that everything works fine when I use a 6x8 font, but then when I go woth a larger 12x16, I get the message that I have run out of SRAM. If I remove any of the other data tables used in my code, I can then get it to run, which made me think that this was a memory issue. I am probably overlooking something here that may be obvious to somebody else.
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5003
Location: Holland

blank.gif
PostPosted: Thu Oct 11, 2018 2:00 pm    Post subject: Reply with quote

you can best send your question and project to support (zipped).
I like to see this error message. I do not think it is about SRAM.
Make sure to send the project that gives a problem with the big font.
Also include the font files, in fact, all files needed to compile the project.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum