Shop OBEX P1 Docs P2 Docs Learn Events
Chrono-dot interface — Parallax Forums

Chrono-dot interface

cavelambcavelamb Posts: 720
edited 2012-02-11 12:33 in Propeller 1
The DS3231 RTC looks to be register compatible with the 1307, but I ran into a little problem with the ChronoDot break out board. It seems that the device address is set on the board at zero - same address as the EEPROM on the Propeller boards. I don't think this issue will effect any other of the microcontrollers out there since they don't have an I2C bus
implemented on board. So adding a single I2C device is straight forward - no conflicts.
But adding a SECOND device, they will run head n into this issue.

I don't see any viable way to change the board, so what's the solution?

Duplicate the I2C bus?

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-02-11 10:37
    Usually the pins on an I2C device are for setting the last few bits of its address so you can use multiple units of the same device. I'd be very surprised if the DS3231 had the same I2C address as EEPROM. (Though, I'm frequently surprised.)

    Have you tried it with a Propeller yet?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-02-11 10:51
    I'm just trying to make sure what I think I understand about I2C is correct.

    In Propeller Eeprom object used in the PEK datalogging lesson there is the code:
    i2cstart
      SendByte(%10100001)                            ' EEPROM I2C address + read operation
    

    The last bit indicates a read or write operation (read in this case). The next three bits are to indictate which address pins are pulled high (none are on the boot EEPROM). The remaining four bits are the device address. I'm not sure if these are the same for all EEPROMs or not.

    The device address of the chrono-dot is "1101" which is different than the EEPROM's "1010". I noticed that the DS3231 doesn't appear to have any address pins to set. So I'm guess you can only use one on a I2C bus.

    Please. Someone correct me if I'm wrong about this stuff.
  • Ron CzapalaRon Czapala Posts: 2,418
    edited 2012-02-11 10:55
    cavelamb wrote: »
    The DS3231 RTC looks to be register compatible with the 1307, but I ran into a little problem with the ChronoDot break out board. It seems that the device address is set on the board at zero - same address as the EEPROM on the Propeller boards. I don't think this issue will effect any other of the microcontrollers out there since they don't have an I2C bus
    implemented on board. So adding a single I2C device is straight forward - no conflicts.
    But adding a SECOND device, they will run head n into this issue.

    I don't see any viable way to change the board, so what's the solution?

    Duplicate the I2C bus?

    I think you are mistaken. The DS3231 uses the same device address as the DS1307: %1101_0000 (or DS1307 = 104 << 1 in the attached driver)

    The attached ZIP file contains a program which displays the time and date on a Sparkfun serial LCD but it can easily be stripped out.

    Hope this helps...
  • cavelambcavelamb Posts: 720
    edited 2012-02-11 12:25
    I think you are mistaken. The DS3231 uses the same device address as the DS1307: 01_0000 (or DS1307 = 104 << 1 in the attached driver)

    The attached ZIP file contains a program which displays the time and date on a Sparkfun serial LCD but it can easily be stripped out.

    Hope this helps...

    Ok, I may have missed what's going on here.

    Examining the board itself, there are a lot of pins grounded and the
    example schematic showed that (calling them N.C)

    I thought they were grounding some address pins.
    But the Maxim documentation says the same thing! So my bad.

    HOWEVER...
    104 dec from your example does agree with 68 hex used in the MaceTech demo code (for the Arduino)

    I'll look at the Maxim docs again.
    I didn't see a default address spec but it's gotta be there somewhere...

    Thanks guys.
  • cavelambcavelamb Posts: 720
    edited 2012-02-11 12:33
    Big as day...
    (although burried way down deep)

    Mom always said it would be handy to learn to read...
Sign In or Register to comment.