Pages: 1 [2]   Go Down
Author Topic: problem interfacing LCD using I2C bus (Solved :) )  (Read 3897 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The LSB from this byte is the R/W bit and has nothing to do with the adress off the device. You do have to send it though..

It has everything to do with the address value that you send to a library that expects an 8 bit address.

Lets see you use the wire library beginning with the transmission of a 7 bit address followed by the transmission of a single read/write bit.

...


The device DOESN'T expect an 8 bit adress. It expects a BYTE. This byte is made up of the 7 MS bits which determines the device adress and the lsb which indictates wether you are writing or reading to/from the device.

So if you want to write to the device 0x38, the first byte you (or rather the wire-library) send is b01110000 (0x70). For reading the same device you send b0111001 (0x71)

I may not know the wire library inside out, but I sure know how to read and interpret a datasheet..
Logged

Australia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The OP wants to get his circuit working.

I'm trying to get the OP's circuit working and have observed that the OP is obviously having trouble translating the address information in the datasheet into the values he needs to send to the arduino libraries.

You're trying to argue semantics for no gain other than to perpetuate the confusion suffered by the OP. Why are you doing that? It achieves nothing positive and makes you look silly to a global audience.

"Arduino... separating programmers and electrical engineers like never before..."
Logged

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

i used the I2C scanner from herehttp://arduino.cc/playground/Main/I2cScanner, the scan suggests that device is connected at 0x38 but still i'm not getting any display on the LCD using this address?
Logged

Australia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i used the I2C scanner from herehttp://arduino.cc/playground/Main/I2cScanner, the scan suggests that device is connected at 0x38 but still i'm not getting any display on the LCD using this address?

Can you please post the code you're using to drive the LCD?

Have you tried connecting LED's to the PCF8574AP instead of the LCD. These will give you a better visual indicator that the PCF8574AP is functioning as expected before moving onto the debugging the LCD.
« Last Edit: August 27, 2012, 01:11:31 am by m12lrpv » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 43
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i used the I2C scanner from herehttp://arduino.cc/playground/Main/I2cScanner, the scan suggests that device is connected at 0x38 but still i'm not getting any display on the LCD using this address?

Have a look in this folder: \Arduino-1.0\libraries\LiquidCristal_I2C\info
It has a nice picture called schematic_diagram. The examples in the library are based on this schematic.
One significant difference with the example you started off is the connection of E , RS and R/W to the PCF.

So, please wire your display as in the schematic and have another go. Forget about the backlight for now, just connect to Vcc and GND (with a resistor of course)
Logged

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

i used the I2C scanner from herehttp://arduino.cc/playground/Main/I2cScanner, the scan suggests that device is connected at 0x38 but still i'm not getting any display on the LCD using this address?

Have a look in this folder: \Arduino-1.0\libraries\LiquidCristal_I2C\info
It has a nice picture called schematic_diagram. The examples in the library are based on this schematic.
One significant difference with the example you started off is the connection of E , RS and R/W to the PCF.

So, please wire your display as in the schematic and have another go. Forget about the backlight for now, just connect to Vcc and GND (with a resistor of course)

"Resistance", thanks for the suggestion, the problem actually were with the wrong connection of E,RS & R/W. thanks a lot everyone in helping me out.
Logged

Málaga, Spain
Offline Offline
Edison Member
*
Karma: 37
Posts: 2172
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Got to the thread too late but it may be worth looking into:
https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home

schematis, performance bench marks for various LCD drivers in a one stop library.
« Last Edit: August 31, 2012, 10:30:44 am by fm » Logged

   

Raleigh, NC.
Offline Offline
Full Member
***
Karma: 0
Posts: 129
Addicted to Arduino
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't understand the Bit bucket website...I have been there and don't get what you're trying to point to....I am having the same deal ...why won't my LCD function using I2C...
Logged

Australia
Offline Offline
Jr. Member
**
Karma: 0
Posts: 69
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't understand the Bit bucket website...I have been there and don't get what you're trying to point to....I am having the same deal ...why won't my LCD function using I2C...
When I first started with I2C and LCD's it was with the DF robot one. That eliminated wiring from the equation but I still had problems.

The issue at the time was that there are greater variations in hardware than the libraries cater for. I found this while I was trying to standardise and combine the various libraries i had downloaded to try.

In the end the first step in getting it working was always to just get the backlight flashing on and off. Once that was working I could move on to sending characters.
Logged

Pages: 1 [2]   Go Up
Jump to: