Go Down

Topic: problem interfacing LCD using I2C bus (Solved :) ) (Read 5 times) previous topic - next topic

ReSiStAnCe



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

m12lrpv

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

sushant

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?

m12lrpv

#18
Aug 24, 2012, 11:49 pm Last Edit: Aug 27, 2012, 08:11 am by m12lrpv Reason: 1

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.

ReSiStAnCe


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)

sushant



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.

fm

#21
Aug 30, 2012, 01:01 am Last Edit: Aug 31, 2012, 05:30 pm by fm Reason: 1
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.
   

Aaron_dyer

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

m12lrpv


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.

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview