connecting two devices to I2C ports on arduino

hi I want to connect LCD (using the PCF8574N) on the SDA-SCL ports of arduino and also the RTC (DS1307) . is it possible and if yes how do I connect them directly or via some kind of bi-directional buffer ?
I guess I will have to set the two devices on unique I2C addresses ?

thanks

You can connect both devices to the Arduino, just make sure that the SDA line from the RTC and from the LCD are both brought to the SDA pin on the Arduino, and the same for the SCL lines.

The devices should already have different addresses set, do a search for I2C scanner sketch and you'll be able to find the addresses of each device.

I can't seem to find the I2C address for DS1307 chip . for PCF8574N data sheet clearly tells on how to set this address but nothing like that for DS1307 so how can I tell?

read reply #1 (or the datasheet)

Mark

If you are using two devices you will need a 4K7 pull up resistor on each of the two lines.

ok its called "slave address" in the datasheet and not device address which caused the confusion. its 0X68

Thanks to all for your help .

There is I2C scanner to find all slaves...

K5CZ:
There is I2C scanner to find all slaves...

That's the one I meant, thanks.