Go Down

Topic: LCD interferes with SD card functions (Read 320 times) previous topic - next topic

ScottMurchison

I am using the Adafruit datalogger shield (Rev B) and a pair of cheap 20x4 LCD I2C displays. My UNO clone is the iteaduino-BT (https://www.itead.cc/iteaduino-bt.html), which is a board I really like.

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 lcd2 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.

PaulS

Quote
My thinking is that the four data lines used by the LCDs (4,5,6,7) may be overlapping with the datalogger card
The arguments to the LiquidCrystal_I2C constructor have nothing to do with the physical pins of the Arduino. The LCD uses the I2C interface, which means analog pins 4 and 5.

Quote
I do have SDA and SCL jumpers soldered on the bottom of the datalogger card.
For what? Connected to what? It appears that you are trying to do something I2C related with the SPI SD card.
The art of getting good answers lies in asking good questions.

ScottMurchison

The Adafruit datalogger shield is compatible with both the UNO and Mega, so they don't connect SDA and SCL to the UNO's A4 and A5 by default. They bring them out to solder pads and you have to bridge them manually with solder. They use I2C for the real time clock and SPI for the SD card on their shield.

Go Up