GLCD Not Working When SD Library Is Included

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
amorgan15
 
Posts: 3
Joined: Thu Sep 26, 2013 3:41 pm

GLCD Not Working When SD Library Is Included

Post by amorgan15 »

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

 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

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: GLCD Not Working When SD Library Is Included

Post by adafruit_support_rick »

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

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

Re: GLCD Not Working When SD Library Is Included

Post by amorgan15 »

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?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: GLCD Not Working When SD Library Is Included

Post by adafruit_support_bill »

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

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

Re: GLCD Not Working When SD Library Is Included

Post by amorgan15 »

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

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”