Shop OBEX P1 Docs P2 Docs Learn Events
DS1307 problems — Parallax Forums

DS1307 problems

PorterPorter Posts: 9
edited 2005-01-19 17:42 in BASIC Stamp
I'm trying to build a data logger using the DS1307 I2C real time clock.
I cannot get the crystal to run. Tried two crystals Digikey 300-1001-nd.
I have the 3.3 volt battery installed. with the right polarity.

I send the correct commands (oscope and decoded) to set the clock but it does not appear to run.

When trying to read the time I get all ones back.
I have scoped the I2C signals writing to the RTC and they appear to decode correctly.
When trying to read it they are set like it's not responding.

Any ideas on how to get the clock running or get the chip to talk back to me.

I've looked the other posts most people had luck with trying another crystal "not so I"

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-18 22:43
    That part number appears to meet the required spec. Double-check you connections -- this gets the best of us. I spoke with a consultant (pro) the other day who was having trouble with a Stamp circuit. The culprit turned out to be a broken connection, but it took him five days to find it.

    BTW ... if you've built the circuit onto a breadboard, that could be affecting the circuit.· Breadboards add a lot of stray capacitance.· In the past I have soldered crystals directly to the chip and made sure the X pins do not get inserted into the breadboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • NewzedNewzed Posts: 2,503
    edited 2005-01-18 22:49
    That part number is for a 12.5pf crystal.· The DS1307 - or the DS1302 - will not run on it.· You need a 6pf crystal, part number 300-1000.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester?

    http://hometown.aol.com/newzed/index.html
    ·
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-18 22:51
    I just looked at the DS1307 specs and it says 12.5 pF (page 12, AC Electrical Characteristics table).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • NewzedNewzed Posts: 2,503
    edited 2005-01-18 23:18
    Jon, you are, of course, absolutely correct.· However, when I built up my 1307 it would not run on the 12.5pf crystal.· Remembering the problems I had with the 1302, I put in a 6pf crystal, or at least I thought I did, and now it runs perfectly.· I will have to pull that clock out of its circuit now to see what is actually there.· A 12.5pf has "3431' stamped on its side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Do you have a Stamp Tester?

    http://hometown.aol.com/newzed/index.html
    ·
  • NewzedNewzed Posts: 2,503
    edited 2005-01-18 23:29
    I pulled my DS1307 out of the circuit and looked at the crystal.· To my deep chagrin it said "3431".· My apologies for a misleading statement

    Sid
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-18 23:31
    Both the NX-1000-24/40 and the forthcoming Professional Development Board use 12.5 pF, so I'm not surprised that's what's actually working in your circuit.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • K de JongK de Jong Posts: 154
    edited 2005-01-19 00:44
    Hi Porter,

    Are you using pull up resistors (4k7) on SCL and SDA?

    The I2C bus will do nothing without them.

    Success,

    Klaus
  • SunflowerSunflower Posts: 48
    edited 2005-01-19 06:00
    These DS1307 posts make me nervous. I have four DS1307s with crystals waiting at the Post Office. I ordered 300-1003-nd crystals. What is the difference between 1001-nd, 1002-nd, and 1003-nd?
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-19 13:37
    You should have a look at the Digi-Key product page(s) for those devices to find out what makes them different.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • SunflowerSunflower Posts: 48
    edited 2005-01-19 16:10
    I did try, but the only differences between crystals on-line specs were prices. I expect this is a not an issue with prototype research.
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-01-19 17:42
    You should be able to track down the manufacturer and get the specs on each crystal from that source.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
Sign In or Register to comment.