Pages: [1]   Go Down
Author Topic: Need help badly  (Read 812 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey all,

I recently got an Uno R3 and a Sainsmart HD44780 LCD and I just can't get it to work. I've updated the LiquidCrystal library and no luck. Based on a lot of the other threads I thought the address could be a problem so i tried to run an i2c scanner and it says no i2c devices found. This is getting really frustrating.

The LCD is illuminated, just no characters no matter what I try. I'm connected to the 5v, grd, a4, a5 pins. The only thing I can think of that's kind of different is that I soldered wires directly to the pins on the lcd's i2c. Can anybody help or think of a reason that the lcd isn't even found?
Logged

0
Offline Offline
Shannon Member
****
Karma: 159
Posts: 10409
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, we need the link to the actual display you are using, the schematic of how you've wired it up and the _complete_ code (in _code tags_) of
what you have now that fails to work.  Photo of your soldering might be useful too.
Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok here's the lcd module I have :

http://www.sainsmart.com/arduino-compatibles/module/lcd-module/sainsmart-iic-i2c-twi-serial-2004-20x4-lcd-module-shield-for-arduino-uno-mega-r3.html

here's the (seemingly foolproof) setup :



close-up of the arduino connections :



close up of the lcd connections :





Here's the i2c scanning code i found :

Code:
#include <Wire.h>


void setup()
{
  Wire.begin();

  Serial.begin(9600);
  Serial.println("\nI2C Scanner");
}


void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 0; address <= 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println(" !");

      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknow error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }    
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(8000);           // wait 8 seconds for next scan
}



and the result is "No I2C devices found"

Any ideas?
« Last Edit: December 21, 2012, 09:04:55 pm by shiloh » Logged

0
Offline Offline
Shannon Member
****
Karma: 159
Posts: 10409
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks OK - including soldering.

Seen this thread BTW? http://arduino.cc/forum/index.php?topic=106655.0  Seems to be exact same hardware setup to yours...

[edit:  hang on - where are the I2C pullups?  That adapter board doesn't appear to have any?  You need 4k7 resistors from SDA to +5V and from SCL to +5V]
« Last Edit: December 21, 2012, 09:11:27 pm by MarkT » Logged

[ I won't respond to messages, use the forum please ]

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hmm. Are you sure? More than one of the solutions I've come across claim that they weren't required.
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 25
Posts: 4107
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
hmm. Are you sure? More than one of the solutions I've come across claim that they weren't required.

From what I have read the current wire library activates the internal pullup resistors but I wouldn't be surprised if they aren't adequate since I believe that they are around 20K ohms.  If I were you I would add some external 4.7K pull-up resistors and see what happens.

If the chip on your I2C interface board is a PCF8574A then the I2C address is 0x3F, if it is a PCF8574 (without the 'A' suffix) then the I2C address is 0x27.

Why am I not surprised that the SainSmart board does not have provisions for pull-up resistors?


Don
Logged

Pages: [1]   Go Up
Jump to: