mchelik Posted June 26, 2019 Posted June 26, 2019 Armbianmonitor: http://ix.io/1MNB I try to use DS1302 RT Clock for my Orange Pi One that uses armbian. I connected this way: DS3102 VCC -> OrangePi pin 2 ( 5V ) DS3102 GND -> OrangePi pin 9 ( GND ) DS3102 CLK -> OrangePi pin 3 ( TWI0_SDA ) DS3102 DAT -> OrangePi pin 5 ( TWI0_SCK ) I added i2c0 to overlays of /boot/armbianEnv.txt and rebooted. Now when I run "sudo i2cdetect -y 0", I get nothing: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- Do you have any idea what should I do to make this work? Any help is appreciated. Thank you
martinayotte Posted June 26, 2019 Posted June 26, 2019 12 hours ago, mchelik said: DS3102 CLK -> OrangePi pin 3 ( TWI0_SDA ) DS3102 DAT -> OrangePi pin 5 ( TWI0_SCK ) According to that, you seems to have crossed SDA/SCK ...
mchelik Posted June 27, 2019 Author Posted June 27, 2019 On 6/26/2019 at 4:05 PM, martinayotte said: According to that, you seems to have crossed SDA/SCK ... Hello Martin, I did as you suggested and still I get nothing unfortunately. I checked the DS1302 with Arduino Mega and the clock actually works fine. Isn't there any more configuration to make armbian use RTC? I found this command that some people suggest but my RTC is not DS3231. echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-0/new_device Or I read on some forums that people add I2C overlay as "i2c0,ds1307". Should I do as such? Thank you for your reply, Regards
martinayotte Posted June 27, 2019 Posted June 27, 2019 36 minutes ago, mchelik said: Or I read on some forums that people add I2C overlay as "i2c0,ds1307". Should I do as such? Maybe later ... But you first need to make it appears in "i2cdetect" otherwise it is worthless ! Maybe your issue is that you used 5V without having i2C level shifter. Since the DS1302 is capable to run at 3V, try using 3V and repeat "i2cdetect" tests ...
mchelik Posted June 27, 2019 Author Posted June 27, 2019 2 hours ago, martinayotte said: Maybe later ... But you first need to make it appears in "i2cdetect" otherwise it is worthless ! Maybe your issue is that you used 5V without having i2C level shifter. Since the DS1302 is capable to run at 3V, try using 3V and repeat "i2cdetect" tests ... Still nothing unfortunately. It's the same even without connecting the power (it has the battery). i2cdetect -l shows this: i2c-1 i2c DesignWare HDMI I2C adapter i2c-0 i2c mv64xxx_i2c adapter I2C adapter I don't connect RST/CE pin of DS1302 to OrangePi; though I don't know which port should I connect to. Can be because of it ? Thank you
martinayotte Posted June 27, 2019 Posted June 27, 2019 14 minutes ago, mchelik said: I don't connect RST/CE pin of DS1302 to OrangePi; though I don't know which port should I connect to. Can be because of it ? I would try to bring this RST/CE to 3V too, since specs mentioned there is an internal pulldown, which prevent the chip from running. (Later on, after figuring that is the issue, you can add a resistor/capacitor to do power-on reset)
mchelik Posted June 27, 2019 Author Posted June 27, 2019 28 minutes ago, martinayotte said: I would try to bring this RST/CE to 3V too, since specs mentioned there is an internal pulldown, which prevent the chip from running. (Later on, after figuring that is the issue, you can add a resistor/capacitor to do power-on reset) Still the same but when I connect CLK to TWI0_SDA i2cdetect prints 1 byte per second; thus i2cdetect takes almost 77 seconds to finish. But doesn't matter how I connect the wires, I get all bytes as "--". I think this is the end. Thank you for your help.
martinayotte Posted June 28, 2019 Posted June 28, 2019 13 hours ago, mchelik said: I think this is the end. That is sad that you are throwing the towel ... It is certainly that you have something wrong in the connection.
guidol Posted June 28, 2019 Posted June 28, 2019 for my DS3231N I used the following pins: DS3231N VCC: Pin1 - 3.3V DS3231N GND: Pin6 - GND (Ground) DS3231N SDA: Pin3 - SDA (Data) DS3231N SCK: Pin5 - SCL (Clock) see also my old post to this topic: maybe the rtc will better for with 3.3v. but the chip is designed for 3.3v-5.0v
skudi Posted July 10, 2019 Posted July 10, 2019 Hi, I've got the same problem. And the problem is RTFM :) According to documentation (https://datasheets.maximintegrated.com/en/ds/DS1302.pdf) DS1302 dos not use i2c. It is using "simple serial protocol". You can find an example here: http://codelectron.com/setting-up-ds1302-rtc-geekcreit-kit-with-orange-pi-zero/ greetings, Michał
Recommended Posts