Go Down

Topic: Arduino with more i2c (Read 110 times) previous topic - next topic

smallpoul

Hi,
     i want to use to library that use the analog pin 4 and 5 but the thing is that one is for the lcd and the second is for the ds1307. I want to keep the pin 0 and 1 for the serial communication. do you guy have some tips.

Thanks

HugoPT

#1
Oct 17, 2013, 12:22 am Last Edit: Oct 17, 2013, 12:27 am by HugoPT Reason: 1
i2C is a BUS.
This bus uses A4(SDA pin and A5(SCLK).Your ds1307 also have those e pins and they are shared with your LCD(if it also use I2C off course)
All you need to do is put pull-up resistors on both lines and connect LCD and ds1307  in the bus.
Every device as an ID so be sure ds1307 as a different ID from the LCD.
Quote
The slave address byte contains the 7-bit DS1307 address, which is 1101000

Your LCD should have an address also, some of then you could choose the address or it is already defined.
Debian,Mint,Ubuntu
Arduino Mega 2560
Arduino Nano
Arduino Duemilanove
MAC OS Montain Lion
Raspberry PI Model B

Go Up