BeagleBone - DS1307 on Ubuntu

Hey all,

I have wired up a typical DS1307 setup (crystal, resistors, battery), and verified that I can set/retrieve the date, that it stores it etc. via an AT328P loaded in an Arduino. I used the Arduino to make sure my wiring/setup was correct, and now I want to move it to my BeagleBone running Ubuntu.

I wired the SDA to pin 18 and the SCL to pin 17 on P9. I have i2c interfaces on /dev/i2c-1 and /dev/i2c-3

I have run the following:

i2cdetect -y -r 3
i2cdetect -y -r 1

Both do not detect a device at 0x68.

I then ran:

echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-3/new_device
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

And it is still not being detected. I also added rtc_ds1307 to /etc/modules and rebooted, its loaded correctly.

dmesg output shows the following relevant lines:

i2c i2c-1: New device: instantiated device ds1307 at 0x68
rtc-ds1307: probe of 1-0068 failed with error -5
i2c i2c-1: New device: instantiated device ds1307 at 0x68

rtc-ds1307: probe of 3-0068 failed with error -5

i am stumped! I would like to use hwclock to sync to the ds1307.

Thanks in advance!

jseitz,

the DS1307 device is normally uses +5V as the primary power rail, which means that the I2C interface will operate at +5V TTL. if you are planning to connect it to the beaglebone i2c interface you will need a level shifter to convert from the +3.3V on the bone to the +5V for the DS1307.

http://www.sparkfun.com/products/10403

Dave