Shop OBEX P1 Docs P2 Docs Learn Events
DS1302 does not play nice with DS1620 — Parallax Forums

DS1302 does not play nice with DS1620

pedwardpedward Posts: 1,642
edited 2012-01-30 15:27 in Propeller 1
I have a project that is using the DS1302 time chip and DS1620 thermometer. These are both from the same manufacturer and are both SPI, however when I bus them together, the DS1302 holds the data line low, causing all reads to be 0. I can only talk to the DS1620 if I remove the DS1302 from the bus. I have rerouted the data line to a dedicated pin and that has cleared up the immediate problem, but I find it incomprehensible that these devices won't work together!

Can anyone shed some light on why the DS1302 seems to be misbehaving?

EDIT: the datasheet for the DS1302 is more complete than the DS1620 and shows 40k bias resistors to ground internal to the chip. Is it possible the DS1620 doesn't have the drive current to overcome even a 40k pulldown? Is my solution to put a 39k pullup on the data line?

Comments

  • RiJoRiRiJoRi Posts: 157
    edited 2012-01-30 12:58
    "Is my solution to put a 39k pullup on the data line?"
    Probably not. Generally, resistors are +- 10%, so a 39k resistor could be from 35.1k to 42.9k.

    I wonder if Dallas Semi might have some info on this?

    --Rich

    P.S., I assume you are bringing the /RST line LOW on the chip you do not want to be active?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2012-01-30 13:12
    Isn't the DS1302 an I2C device not SPI?

    Edit: While I'm pretty sure the DS1302 is I2C, I'm not sure what to call the DS6020. It datasheet says it uses a "three-wire serial interface". I'm not sure if it's technically a SPI device either. Sorry for just guessing at what they're not and not offering any solutions.

    Edit again: You might want to make sure whenever you finish using one driver to set the line to inputs before using the other driver. At least one EEPROM driver leaves the lines as outputs after it reads or writes which interferes with other drivers that try to use the I2C lines.

    Edit one more time: Sorry about that, I was wrong about the I2C think. It still might be worth making sure the drivers release the lines.
  • ZootZoot Posts: 2,227
    edited 2012-01-30 13:13
    The DS1307 is the I2C version of the DS1302, which is SPI.
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-01-30 13:21
    pedward wrote: »
    I have a project that is using the DS1302 time chip and DS1620 thermometer. These are both from the same manufacturer and are both SPI, however when I bus them together, the DS1302 holds the data line low, causing all reads to be 0. I can only talk to the DS1620 if I remove the DS1302 from the bus. I have rerouted the data line to a dedicated pin and that has cleared up the immediate problem, but I find it incomprehensible that these devices won't work together!

    Can anyone shed some light on why the DS1302 seems to be misbehaving?

    EDIT: the datasheet for the DS1302 is more complete than the DS1620 and shows 40k bias resistors to ground internal to the chip. Is it possible the DS1620 doesn't have the drive current to overcome even a 40k pulldown? Is my solution to put a 39k pullup on the data line?

    Both look SPI. DS1302 data sheet shows single byte or burst mode of transfer. May be worth looking into whether it is in burst mode and holding the bus to send remaining bytes.

    Frank

    Also, what is the status of the cs line when the ds1302 is not suposed to be active? Is it low when trying to access the ds1620?
  • pedwardpedward Posts: 1,642
    edited 2012-01-30 13:26
    The DS1302 datasheet is much newer than the DS1620. There is a note that the CE line was called /RST in the older datasheets. This matches the nomenclature of the DS1620.

    The DS1302, as tested, is not actively held in reset (disabled) as the chip has a pulldown to hold it in shutdown/reset mode.

    The DS1620 has a max Icc of 1ma, which would indicate a very high impedance/weak drive on the DQ line. But even then, the drive current would only need to be around 100ua to drive the DQ high. This would suggest that the DS1302 is actively asserting a low on the data line when disabled.
  • JonnyMacJonnyMac Posts: 9,197
    edited 2012-01-30 15:27
    If you put a 4.7K resistor on the DO line of the 1620 that will give the 1302 something to drive against when that pin is held low.
Sign In or Register to comment.