Hi,
I'm trying to talk with a RTC sparkfun module using I2C, with no sucess at all.
I'm using this code and schema, with a Diecimila
The chip just answers "0" to everything (as if it wasn't there at all).
In some places, it is mentioned that the I2C lines to be used are analog 4 and 5, and not digital 0 and 1; some people say pull up resistors should be used..
I'm confused. Any help would be wellcomed !
Thanks !!
Sparkfun claims to have set the clock prior to shipment but I've seen one instance that they didn't the clock was just not set. There's nothing to read back except for a stopped clock with all zeros. Try the arduino tutorial as pointed out by KE7GKP. I thought there are more tutorials but maybe I should write one myself.
Ooooooohhhh I'm so sorry it seems it was just a broken wire.
Now I connected to analog in pint 4 and 5, this time correctly, and seems to work fine !
(I feel sooo stupid)
Alright! Normally you don't need external pull-up resistors. The wire library turns on the internal pullup resistor, enough for this type of application.
The title is not very descriptive. I though this was a complaint thread and was not going to bother reading it...
OK I worked over the time library and the DS1307 library pretty thoroughly and updated all the examples that I thought were useful (to me).
Find all the code here. It should help you get started. First install the time libraries, then add my DS1307 Library, and update the time library with the code and examples provided.