Please be aware of all shipping deadlines before placing your order - we cannot guarantee orders will arrive before Christmas!

GLCD Not Working When SD Library Is Included
Moderators: adafruit_support_bill, adafruit

GLCD Not Working When SD Library Is Included

by amorgan15 on Thu Sep 26, 2013 3:49 pm

Hello,

I am working on a project that uses an adafruit Nokia 5110 screen (and associated libraries) and an adafruit MicroSD breakout board. The screen is connected in a way that the initializing line of code is:
Code: Select all | TOGGLE FULL SIZE
 Adafruit_PCD8544 display = Adafruit_PCD8544(13, 8, 5, 7, 6);


The screen works perfectly when the SD.h library is not included, however, when the SD library is included the screen works for a split second and then either goes blank or displays weird symbols.

I purposefully avoided that 4 and 10 pins when connecting my screen in order to not interfere with all that is going on in the background of the SD code.

Thanks in advance,

Austin
amorgan15
 
Posts: 3
Joined: Thu Sep 26, 2013 3:41 pm

Re: GLCD Not Working When SD Library Is Included

by adafruit_support_rick on Thu Sep 26, 2013 4:55 pm

Sounds like an SRAM memory issue. Have a look at our tutorial on Arduino Memories:
http://learn.adafruit.com/memories-of-an-arduino

adafruit_support_rick
 
Posts: 14568
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: GLCD Not Working When SD Library Is Included

by amorgan15 on Thu Oct 03, 2013 1:36 pm

I did all that I could to optimize the SRAM in my sketch, but I am still having the same issues. Should I try to mess around with the libraries too?
amorgan15
 
Posts: 3
Joined: Thu Sep 26, 2013 3:41 pm

Re: GLCD Not Working When SD Library Is Included

by adafruit_support_bill on Thu Oct 03, 2013 1:51 pm

Try commenting out some other SRAM-using parts of your code. If the display starts working again, then you know for sure it is a memory problem. Your options then are to optimize further or move to a processor with more memory: http://learn.adafruit.com/adafruit-ardu ... ison-chart
User avatar
adafruit_support_bill
 
Posts: 32666
Joined: Sat Feb 07, 2009 10:11 am

Re: GLCD Not Working When SD Library Is Included

by amorgan15 on Thu Oct 03, 2013 2:27 pm

I took out more and more stuff and it started working. I was only at about 80% full data capacity for my nano but it seems as though I exceeded the SRAM.

Thank you
amorgan15
 
Posts: 3
Joined: Thu Sep 26, 2013 3:41 pm