Shop OBEX P1 Docs P2 Docs Learn Events
NJU6355 RTC woes — Parallax Forums

NJU6355 RTC woes

ArchiverArchiver Posts: 46,084
edited 2000-10-21 20:50 in General Discussion
Would anyone here happen to know what the load
capacitance of the accompanying 32.768khz crystal
should be? I've read and reread the datasheet, but
can't seem to find it. Three e-mails to NJR have gone
unanswered.

I've tried a 10.5pf crystal, and it ran fast. On a 12.5pf
crystal it ran much better, but would still drift off one or
two seconds per hour. Am I maybe expecting too much
accuracy from such an inexpensive RTC?

Oh, one more question. Where can one find those 6pf 32.768khz
crystals that are needed for some of Dal-Semi's RTC's? I can't find
these things anywhere! :-(

Cheers,

Steve

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 03:13
    I have a document at work which discusses calibrating this particular
    clock. I received it from an engineer at NJR. I can dig it up if you like.

    I was surprised to learn from this document, that there is actually a way
    to put the nju clocks into a mode which would allow you to calibrate the
    frequency, though i think you need a long period counter to accomplish this.

    let me know if you want me to find it.

    good luck,

    steve





    At 07:28 AM 10/11/2000 EDT, you wrote:
    >Would anyone here happen to know what the load
    >capacitance of the accompanying 32.768khz crystal
    >should be? I've read and reread the datasheet, but
    >can't seem to find it. Three e-mails to NJR have gone
    >unanswered.
    >
    >I've tried a 10.5pf crystal, and it ran fast. On a 12.5pf
    >crystal it ran much better, but would still drift off one or
    >two seconds per hour. Am I maybe expecting too much
    >accuracy from such an inexpensive RTC?
    >
    >Oh, one more question. Where can one find those 6pf 32.768khz
    >crystals that are needed for some of Dal-Semi's RTC's? I can't find
    >these things anywhere! :-(
    >
    >Cheers,
    >
    >Steve
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 13:51
    I would _really_ appreciate that Steve, if it's not too much trouble.

    I'm surprised at how little information there is available online about this
    part. Maybe I should stop being so stubborn and make the move to
    the Dal-Semi RTC's (if I can ever find a source for those 6pf crystals).

    Thanks!

    Steve

    << I have a document at work which discusses calibrating this particular
    clock. I received it from an engineer at NJR. I can dig it up if you like.
    >>
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 14:10
    Last year I was using the NJU635E RTC and used a crystal with a
    12.5pf
    load capacitance like the one you tried. That was the best I could
    get
    it to run.

    Andy

    --- In basicstamps@egroups.com, PicProgrammer@a... wrote:
    > Would anyone here happen to know what the load
    > capacitance of the accompanying 32.768khz crystal
    > should be? I've read and reread the datasheet, but
    > can't seem to find it. Three e-mails to NJR have gone
    > unanswered.
    >
    > I've tried a 10.5pf crystal, and it ran fast. On a 12.5pf
    > crystal it ran much better, but would still drift off one or
    > two seconds per hour. Am I maybe expecting too much
    > accuracy from such an inexpensive RTC?
    >
    > Oh, one more question. Where can one find those 6pf 32.768khz
    > crystals that are needed for some of Dal-Semi's RTC's? I can't find
    > these things anywhere! :-(
    >
    > Cheers,
    >
    > Steve
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 17:32
    Hi Steve,
    NJR makes three real time clock chips:
    NJU6355
    NJU6356 -- "stabilized" oscillation <???!!!>
    NJU6358. -- alarm and wakeup feature
    If you download the data sheet for the NJU6358 you will see a diagram for
    the oscillator circuit, including values for Cg and Cd.
    http://sdremote1.njr.com/cdrom/index/ce/ce12010.pdf
    The description of the circuit is hilarious, translated from Japanese, like
    directions on a package of top ramen. It suggests, "It is required to
    examinate the matching of the crystal and the oscillation circuit, so that
    some kinds of the crystal may be required to connect the external
    capacitor." But it doesn't spec a value for the load capacitance. FYI,
    the load capacitance cannot be derived directly from Cg and Cd, rather, it
    is usually measured by its effect on the frequency of a known crystal. I
    have no idea if '6355 circuit is the same. The existance of the NJU6356
    makes me wonder. The only difference between that and the '6355 seems to be
    the "stabilized" oscillator, but there are _no specs_!. FWIW, in
    connection Pierce oscillators "stabilized" can refer to inclusion of the
    series resistor to reduce drive power to the crystal. But they can't be
    driving the crystal too too hard. The circuit operates at 4 microamps.

    Steve Sargeant, if you can't find that calibration paper, I recall that you
    sent a copy of it to me at one time when this came up. If you can't find
    it, I'll take a look in my disarray of papers. Did you start using the
    Dallas DS32KHZ then? -- 4 minutes per year over the -40 to +85 temperature
    range

    -- Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com






    >>>Would anyone here happen to know what the load
    >>>capacitance of the accompanying 32.768khz crystal
    >>>should be? I've read and reread the datasheet, but
    >>>can't seem to find it. Three e-mails to NJR have gone
    >>>unanswered.
    >>>>I've tried a 10.5pf crystal, and it ran fast. On a 12.5pf
    >>>crystal it ran much better, but would still drift off one or
    >>>two seconds per hour. Am I maybe expecting too much
    >>>accuracy from such an inexpensive RTC?
    >>>Steve

    >>I have a document at work which discusses calibrating this particular
    >>clock. I received it from an engineer at NJR. I can dig it up if you
    like.
    >>I was surprised to learn from this document, that there is actually a way
    >>to put the nju clocks into a mode which would allow you to calibrate the
    >>frequency, though i think you need a long period counter to accomplish
    this.
    >>let me know if you want me to find it.
    >>steve

    >I would _really_ appreciate that Steve, if it's not too much trouble.
    >I'm surprised at how little information there is available online about
    this
    >part. Maybe I should stop being so stubborn and make the move to
    >the Dal-Semi RTC's (if I can ever find a source for those 6pf crystals).
    >Steve
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 21:58
    Hi Steve and Tracy,

    I have not been able to locate the document yet, but I'm sure i can find
    it. I may also have a name and number for an application engineer at NJU. I
    spoke with engineer last year and was impressed with his knowledge and
    desire to help. He's the one that set me up with this "secret document".

    I drove the NJU6355 with the DS32Khz for about two months, and at room
    temperature, it was off by only 4 or 5 seconds. of course how can one know
    this, my solution was to check the time against a web site that was updated
    from a clock found here http://tycho.usno.navy.mil/cgi-bin/timer.pl

    Steve
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-12 23:39
    Hi Steve and Steve,

    I did find my copy of the NJR "product note" document you (S. Sargent)
    faxed to me back in May'99. It states that the load capacitance is 14 pf.
    It gives a laborious procedure to add external trims to improve the
    stability. As you mentioned, it also tells how to get the chip into test
    mode, which is 128 hertz output.

    The DS32KHZ is remarkable. I'm suprised that the established crystal
    manufacturers like Statek have not followed up with a product like that.

    -- Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com


    ---original message--->
    >Hi Steve and Tracy,
    >I have not been able to locate the document yet, but I'm sure i can find
    >it. I may also have a name and number for an application engineer at NJU.
    I
    >spoke with engineer last year and was impressed with his knowledge and
    >desire to help. He's the one that set me up with this "secret document".
    >I drove the NJU6355 with the DS32Khz for about two months, and at room
    >temperature, it was off by only 4 or 5 seconds. of course how can one know
    >this, my solution was to check the time against a web site that was
    updated
    >from a clock found here http://tycho.usno.navy.mil/cgi-bin/timer.pl
    >Steve
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-13 15:56
    Thank you for all the input Steve, Tracy, Andy, and Peter.
    Now I know why the 6355 is as inexpensive as it is. ;-)
    I'm glad that I didn't buy more than one tube. For short term,
    non-critical timing, I suppose I'll continue to use the 6355
    with the 12.5pf crystals. But all this talk has persuaded me
    to move on to the Dallas parts (1302/1305/1306/1602). On
    a happy note, I did finally find a source for those 6pf crystals,
    if anyone else is looking. Part number C-002RX 32.768K-E,
    available from www.norvell.com, only $0.20 a piece. With the
    DalSemi parts as popular as they are, I'm surprised it is so
    hard to find the supporting crystals (at least in my usual
    haunts - Digikey, Mouser, Jameco, Newark, Allied, etc).

    Speaking of searching for parts, can anyone recommend any
    online parts searching tools besides www.findchips.com? I use
    findchips every day, but was just wondering what else was out there.

    Thanks again guys.

    Cheers,

    Steve
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-13 16:19
    Hi Steve,

    I've always used the 10.5 pf crystals from jameco. Most of my projects are
    outside, long term and the NJU clock is usually off by no more than 5
    minutes per month.

    fwiw

    Steve









    At 10:56 AM 10/13/2000 EDT, you wrote:
    >Thank you for all the input Steve, Tracy, Andy, and Peter.
    >Now I know why the 6355 is as inexpensive as it is. ;-)
    >I'm glad that I didn't buy more than one tube. For short term,
    >non-critical timing, I suppose I'll continue to use the 6355
    >with the 12.5pf crystals. But all this talk has persuaded me
    >to move on to the Dallas parts (1302/1305/1306/1602). On
    >a happy note, I did finally find a source for those 6pf crystals,
    >if anyone else is looking. Part number C-002RX 32.768K-E,
    >available from www.norvell.com, only $0.20 a piece. With the
    >DalSemi parts as popular as they are, I'm surprised it is so
    >hard to find the supporting crystals (at least in my usual
    >haunts - Digikey, Mouser, Jameco, Newark, Allied, etc).
    >
    >Speaking of searching for parts, can anyone recommend any
    >online parts searching tools besides www.findchips.com? I use
    >findchips every day, but was just wondering what else was out there.
    >
    >Thanks again guys.
    >
    >Cheers,
    >
    >Steve
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-13 18:30
    Steve,

    I found an interesting posting on another mailing list:

    --snip--

    From: Brian Dickens <bdicken@a...>
    Date: Mon, 01 May 2000 13:48:26 -0400

    Hello Vikki et al.,

    I got a clock crystal and programmed the NJU6355 clock. In the first
    trial, I ran the clock overnight, reading the time from it every
    second. It was about one hour slow after about 13 hours of running. Much
    later, yesterday in fact, I ran it again, this time reading it only every 5
    minutes to test whether the clock or the crystal was at fault. It still
    lost some time in about 10 hours of running but less than a minute. The
    clock only seems to be useful if you read it very infrequently or if you
    want to use it as a battery monitor - I haven't tried that.

    --snip--

    In my testing of the 6355 I polled it almost continuously. I'll have to
    do some more testing - running it for a couple of hours without polling
    it, then running it for the same amount of time while polling continuously.
    The plot thickens......... LOL

    Steve


    << I've always used the 10.5 pf crystals from jameco. Most of my projects are
    outside, long term and the NJU clock is usually off by no more than 5
    minutes per month. >>
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-14 03:01
    Hi Steve,

    Is your clock on a breadboard? I believe that could cause some serious
    errors due to the stray capacitance?

    I've always had my clocks mounted on a pc board


    Steve







    At 01:30 PM 10/13/2000 EDT, you wrote:
    >Steve,
    >
    >I found an interesting posting on another mailing list:
    >
    >--snip--
    >
    >From: Brian Dickens <bdicken@a...>
    >Date: Mon, 01 May 2000 13:48:26 -0400
    >
    >Hello Vikki et al.,
    >
    >I got a clock crystal and programmed the NJU6355 clock. In the first
    >trial, I ran the clock overnight, reading the time from it every
    >second. It was about one hour slow after about 13 hours of running. Much
    >later, yesterday in fact, I ran it again, this time reading it only every 5
    >minutes to test whether the clock or the crystal was at fault. It still
    >lost some time in about 10 hours of running but less than a minute. The
    >clock only seems to be useful if you read it very infrequently or if you
    >want to use it as a battery monitor - I haven't tried that.
    >
    >--snip--
    >
    >In my testing of the 6355 I polled it almost continuously. I'll have to
    >do some more testing - running it for a couple of hours without polling
    >it, then running it for the same amount of time while polling continuously.
    >The plot thickens......... LOL
    >
    >Steve
    >
    >
    ><< I've always used the 10.5 pf crystals from jameco. Most of my projects are
    > outside, long term and the NJU clock is usually off by no more than 5
    > minutes per month. >>
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-14 04:15
    Hi Steve,

    Something else I've thought of which may or may not matter:

    I started using this clock when I purchased Scott Edwards DCPB(excellent kit).

    This kit uses a pulldown resistor from the CE terminal to ground(around 10
    K) and also a 1 kohm
    resistor in series with the data pin. I think the 1 kohm resistor is there
    in case the NJU data pin is at, say a high state(output) and the stamp pin
    was low or visa-versa.

    Also, if you like you could send your clock code for us to look at.

    I've always had good luck with this chip and think something must be
    messing yours up.

    good luck,

    Steve
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-15 19:31
    >>I found an interesting posting on another mailing list:
    >>--snip--
    >>From: Brian Dickens <bdicken@a...>
    >>>Hello Vikki et al.,
    >>>I got a clock crystal and programmed the NJU6355 clock. In the first
    >>>trial, I ran the clock overnight, reading the time from it every
    >>>second. It was about one hour slow after about 13 hours of running.
    Much
    >>>later, yesterday in fact, I ran it again, this time reading it only
    every 5
    >>>minutes to test whether the clock or the crystal was at fault. It
    still
    >>>lost some time in about 10 hours of running but less than a minute. The

    >>>clock only seems to be useful if you read it very infrequently or if you

    >>>want to use it as a battery monitor - I haven't tried that.
    >--snip--

    >In my testing of the 6355 I polled it almost continuously. I'll have to
    >do some more testing - running it for a couple of hours without polling
    >it, then running it for the same amount of time while polling
    continuously.
    >The plot thickens......... LOL
    >Steve

    Brian's observation seemed pretty incredible. Could a company like NJU
    really sell a product with a quirk like that and not mention it in the
    specs? (you don't have to answer that!).

    I think something must have been wrong with Brian's setup. To check, I ran
    an NJU6355 for 24 hours, reading out and displaying the time every 1
    second. At the end of 23 hours, the time reported by the NJU6355 (compared
    to a time server) was 4 seconds fast. That is an error of 46ppm, within
    specs of the crystal itself. That is without any special tuning of the Cg
    value, just a stock Digikey 12.5pf xtal on a printed circuit board, at room
    temperature. So my conclusion is that the chip does _not_ have that
    particular "fatal flaw".

    I second Steve's comment, never to expect good performance from a clock
    chip mounted on one of those white breadboard blocks. There is about 200pf
    extra capacitance between adjacent nodes on the block.

    -- Tracy Allen
    electronically monitored ecosystems
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-20 11:50
    Tracy,

    I had the circuit built up on plain perfboard, wired point
    to point. Before I give up on the part, I'm going to build
    it on a proper PCB, with the crystal mounted securely.
    Now if I can only get Proteus Lite to output some useable
    artwork........ [noparse]:([/noparse]

    Steve

    << I second Steve's comment, never to expect good performance from a clock
    chip mounted on one of those white breadboard blocks. There is about 200pf
    extra capacitance between adjacent nodes on the block. >>
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-20 11:51
    Steve,

    That's exactly how mine is set up, CE has a 10K pd and Data a 1K pd.
    The circuit and code came right out of Scott's Stamp App #20. If I can
    figure out how to get Proteus Lite to print a quality positive, I'm going to
    shoot a PCB this weekend and see if that will make a difference over the
    perfboard hatchet job I've been using thus far.

    I have the crystal attached as closely as possible to the IC, but I got to
    wondering if it is necessary to attach (glue?) the crystal case to the board?
    So far I've had it more or less flapping in the breeze, to make it easier to
    swap out crystals during testing.

    Regards,

    Steve

    << This kit uses a pulldown resistor from the CE terminal to ground(around 10
    K) and also a 1 kohm resistor in series with the data pin. I think the 1
    kohm
    resistor is there in case the NJU data pin is at, say a high state(output)
    and the stamp pin was low or visa-versa. >>
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-21 06:12
    Hi Steve,

    >That's exactly how mine is set up, CE has a 10K pd and Data a 1K pd.

    Do you mean that the data pin has a series resistor, not a pull down?

    though I don't think that it would effect the timekeeping.

    I've been thinking about your mentioning that you were reading the clock at
    a quick rate(several times per second). I've never had an application like
    this, usually i read the clock at the most once a minute. I just
    reprogrammed a project where the clock runs fine on, to simply read the
    clock as fast as it can.

    I'll let you know if the drift increases.

    >The circuit and code came right out of Scott's Stamp App #20. If I can
    >figure out how to get Proteus Lite to print a quality positive, I'm going to
    >shoot a PCB this weekend and see if that will make a difference over the
    >perfboard hatchet job I've been using thus far.

    One way to decrease the capacitance from a protoboard would be to mount the
    clock in an 8 pin dip socket, which has had the two legs for the oscillator
    circuitry cut off. Then the pins don't contact the protoboard.

    I doubt though this will make much difference.

    Has anyone on this list used a NJU clock in an application where the clock
    was read quickly over and over?

    Did the clock still track time well?


    Steve

    >
    >I have the crystal attached as closely as possible to the IC, but I got to
    >wondering if it is necessary to attach (glue?) the crystal case to the board?
    >So far I've had it more or less flapping in the breeze, to make it easier to
    >swap out crystals during testing.
    >
    >Regards,
    >
    >Steve
    >
    ><< This kit uses a pulldown resistor from the CE terminal to ground(around 10
    > K) and also a 1 kohm resistor in series with the data pin. I think the 1
    >kohm
    >resistor is there in case the NJU data pin is at, say a high state(output)
    >and the stamp pin was low or visa-versa. >>
    >
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-21 17:13
    ><< This kit uses a pulldown resistor from the CE terminal to ground(around
    10
    >> K) and also a 1 kohm resistor in series with the data pin. I think the 1

    >>kohm
    >>resistor is there in case the NJU data pin is at, say a high
    state(output)
    >>and the stamp pin was low or visa-versa. >>
    >
    > That's exactly how mine is set up, CE has a 10K pd and Data a 1K pd.
    > The circuit and code came right out of Scott's Stamp App #20. If I can
    > figure out how to get Proteus Lite to print a quality positive, I'm going
    to
    > shoot a PCB this weekend and see if that will make a difference over the
    > perfboard hatchet job I've been using thus far.
    >
    > I have the crystal attached as closely as possible to the IC, but I got
    to
    > wondering if it is necessary to attach (glue?) the crystal case to the
    board?
    > So far I've had it more or less flapping in the breeze, to make it easier
    to
    > swap out crystals during testing.

    Hi Steve,

    You shouldn't need to glue down the crystal, although it might be a good
    idea in the long run. A sliver of thick double-stick tape works pretty
    well.

    In your original post you stated that the time was off by one or two
    seconds per hour. That is a lot, more than 300ppm, compared with the
    specification of around 20-50ppm for tuning fork watch crystals. When the
    capacitance is matched, and at room temperature, it should be within 2
    seconds per day, given a 20ppm crystal. I've found that adding 10-20 pf
    externally brings the time within 1 second per day (at room temperature).
    That is extra Cg, from pin 2 to ground.

    Have you tried a different crystal, or a different NJU chip from the tube?
    Maybe it was off or damaged. Or there is something in the layout or the
    power supply.

    > Has anyone on this list used a NJU clock in an application where the
    clock
    > was read quickly over and over?
    > Did the clock still track time well?

    Yes, I've tried that. The result in terms of time drift on a particular
    clock chip is the same whether reading at once per second, once per six
    seconds, or once per minute.

    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-21 17:48
    << Do you mean that the data pin has a series resistor, not a pull down?>>

    Oooops, sorry Steve. I was typing from (faulty) memory. You're right, I
    meant CE has a 10K pulldown, while Data has a 1K series resistor.

    <<I've been thinking about your mentioning that you were reading the clock at
    a quick rate(several times per second). I've never had an application like
    this, usually i read the clock at the most once a minute. I just
    reprogrammed a project where the clock runs fine on, to simply read the
    clock as fast as it can. >>

    The circuit I had built up was little more than an LCD clock - albeit costing
    $100 for less functionality than a $1.99 dime store version. ;-) I just
    wanted to
    test out the date/day/month/etc. rollover of the 6355 before going on and
    using
    the part in a real (read useful) application. That's when this timing problem
    reared
    its ugly head.

    <<I'll let you know if the drift increases.>>

    Thanks Steve. I look forward to hearing of your results. Oh, there's one more
    thing I wanted to mention. I'm not sure if this could have anything to do with
    the problem, but for simplicity sake I'm powering the clock directly off of
    one
    of the BS2 pins.

    Regards,

    Steve
  • ArchiverArchiver Posts: 46,084
    edited 2000-10-21 20:50
    Hi Steve,


    After 14 hrs of reading my clock at 20 times a second, It's still accurate
    to within a second.

    Powering the clock from a stamp pin is ok, provided you don't use the sleep
    or nap instructions.

    I would run it off the 5 volt regulator, with an assortment of capacitors
    accross the power leads of the clock. maybe a .01, .1 and a 1 microfarad.

    I agree with Tracy about the possibility of the clock or crystal not
    working properly.

    I'm not sure how involved your program is, but I always try to remove all
    unneccsary code when trying to track down a problem. Then build it back up
    once you get it working.

    how about a look at your clock routine?

    One potential problem could be the state of the NJU I/O pin during your
    program. I think that if this pin is high anytime the CE pin is brought
    high, that the clock believes your going to give it new time information,
    and may halt the clock.

    Steve
Sign In or Register to comment.