SD Card on Datalogger shield and LCD displays

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
scottmurchison
 
Posts: 27
Joined: Tue Mar 19, 2013 10:29 am

SD Card on Datalogger shield and LCD displays

Post by scottmurchison »

I am using the datalogger shield (Rev B) and a pair of 20x4 LCD I2C displays. I am getting interference between the LCD displays and the SD card function. Sometimes I can write to the SD card, and sometimes I can't. I have tried several SD cards. After a lot of experimenting, I think I have identified the problem. The LCDs are interfering somehow with the SD card functions. The LCDs are created with the following statements;

// set the lcd1 address to 0x26
// Set the pins on the I2C chip used for lcd1 connections:
// addr, en,rw,rs,d4,d5,d6,d7,bl,blpol
LiquidCrystal_I2C lcd1(0x26, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

// set the lcd1 address to 0x27
LiquidCrystal_I2C lcd2(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

If I comment out the LCD lines, the SD problem goes away. My thinking is that the four data lines used by the LCDs (4,5,6,7) may be overlapping with the datalogger card, but after looking at the datalogger schematic, I can't see the problem. I found a couple of websites saying that I can map the LCDs to use different data lines, but I'm not sure if that is the problem. I do have SDA and SCL jumpers soldered on the bottom of the datalogger card.

I would greatly appreciate any help.

Scott

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: SD Card on Datalogger shield and LCD displays

Post by adafruit_support_mike »

I don't recognize that LCD control object. What library are you using?

User avatar
scottmurchison
 
Posts: 27
Joined: Tue Mar 19, 2013 10:29 am

Re: SD Card on Datalogger shield and LCD displays

Post by scottmurchison »

I used the library pointed to from https://arduino-info.wikispaces.com/LCD-Blue-I2C

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: SD Card on Datalogger shield and LCD displays

Post by adafruit_support_mike »

I'm not familar with that code, and the page you linked says it's for displays that use a PCF8574 I2C GPIO expander. It looks like the numbers in these lines:

Code: Select all

LiquidCrystal_I2C lcd1(0x26, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
LiquidCrystal_I2C lcd2(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);
refer to pins on the GPIO expander, not to pins on the Arduino. I don't think any of the Arduino's pins with those numbers should be connected to the displays.

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

Return to “Arduino Shields from Adafruit”