Shop OBEX P1 Docs P2 Docs Learn Events
RTC DS 1302 troubles — Parallax Forums

RTC DS 1302 troubles

bbdelhommebbdelhomme Posts: 14
edited 2008-04-15 18:41 in BASIC Stamp
Sorry, I forgot the subject into my previous submission. So I add it and repeat my submission.

I am developing a simple and private application with DS 1302 and BS2E in order to power on a light (12V DC) each hour.
Based on the file DS_Demo.bs2 from Chris Savage, as first development step I try to display clock informations on my PC sceen.
The immediat display is: 00/00/00 00:00PM [noparse]/noparse]00] then FF/FF/FF 5F:FFPM [noparse][[/noparse]F8
Substituting the DS1302, then the Xtal by others ones: no improvement.
What's happen? Where could be the failure in my circuitry ?

Many thanks in advance for your support and recommendations

Bernard

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Bernard

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-04-12 20:59
    Did you build the RTC on a solderless breadboard?·
    [noparse][[/noparse]If so, that's not good.··The solderless contacts are very capacitive and that has a bad effect on the crystal.]
  • bbdelhommebbdelhomme Posts: 14
    edited 2008-04-12 21:45
    Yes, I built it on Parallax Profesional Development Board.
    In addition to your statment, I just read comment into this forum about bad contacts of Xtal into breadboard.
    Thanks for your recommendation, I will test my RTC with solder board.

    Bernard

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bernard
  • bbdelhommebbdelhomme Posts: 14
    edited 2008-04-13 13:59
    Good morning,

    Following the Allen' statment, I installed my RTC on soldered board, with·soldered Xtal. Always with Chris Savage' DS1302_Demo progam code·I got the similar displays:
    "RESET Stamp to return to menu
    FC/FC/FC· 5C:FCPM [noparse]/noparse]FC"

    As complementary information, taking into account that I·have fought with this issue·since some weeks,·I supplied DS1302 from two suppliers.
    For units from·French supplier·and with three different units I got·the same displays:"RESET......... FC/FC/FC· 5C:FCPM [noparse]/noparse]FC"
    For units·coming from directly from MAXIM, DS1302·manufacturer, and with two different units, I got different displays but the same for each units: "RESET............00/00/00 00:00:000"

    Reading into this forum the comments from Chris Savage, Paul Sr and Sam in 11/14/2006, I performed the test to place the Xtal leads into the same holes that DS1302 pins. Unfortunately I got the same displays for the same DS 1302 units.

    How do understand these displays ?

    What can I do to solve my problem ?

    Many thanks in advance for your comments and suggestions

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bernard
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-04-13 14:08
    The crystal has to be snug like, close to the IC's pins.· Also, it'd help if you remove the flux from the area, too (it's capacitive.)

    Could you photograph your soldering job and post it?

    (just trying to help)
  • bbdelhommebbdelhomme Posts: 14
    edited 2008-04-13 16:08
    Allen,

    First, many thanks for your support.

    Please find attached two photos of my job. What do you think about it ?

    Sorry, I don't understand your concern about "flux". What flux ? Magnetic one ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bernard
    2560 x 1920 - 1M
    2560 x 1920 - 2M
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-04-13 16:33
    A picture is worth a thousand words.· Thanks for posting yours.·
    Your picture shows that you have the crystal connected to pins 6 and 7.· It should be connected to pins 2 and 3.
    Is everything else mixed-up that way, too?· Double-check everything.

    "Flux" is the rosin (wax-like stuff) that works out of the melting solder.

    crystal_help.jpg
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2008-04-13 16:46
    As Allen noticed, the xtal connects to pins 2 & 3! Attached is a photo of how I recommend attaching it to the DS1302. Pins 2 & 3 are cut short. This minimizes the stray capacitance and makes a solid connection, but the chip can still be plugged into a socket or breadboard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    306 x 236 - 12K
  • bbdelhommebbdelhomme Posts: 14
    edited 2008-04-14 13:03
    Good morning

    I was very surprised by PJ Allen' statement about my Xtal connections. As recommended I double checked everything again and my wiring was fully wrong not only Xtal connections. Look for why I·made this stupid mistake, I found that in the book that I used at the beginning of my project, the DS1302 drawing is unclear: top view reference is not noticed and the pins and their numbers are not located at the same place that in your picture.
    So, I wired again and the clock is running well with Xtal leads into the holes with DS1302 pins. I don't check yet my five units of DS1302 but wiring again one of them in my BB, the clock is running but·the displays are not stable and·very often·wrong. I assumed that could be the·BB inconvenient descrided in your previous reply.

    I don't yet experiment the Tracy Allen' recommendation, soldering the Xtal on DS1302 pins as shown on his photo. I remerber reading a comment from Chris Savage into this forum, who don't recommend to do it like that if I well·understand.

    So, sincerely many thanks for your support and quick replies. Now I can go head my development. As experience, I will double check pin by pin·with manufacturer data sheet instead of other drawing.

    As complementary question: according to your experiences DS1302 (stability, accuracy)·and/or BS2E 5V (Vdd) regulator used to supply DS1302 could be damaged by my wrong wiring and previous tests ?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bernard
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2008-04-14 17:45
    There is no danger that the BS2e regulator would be damaged by having misconnnected the chip. The DS1302 chip itself, I don't know for sure. With the chip inserted in reverse, Vdd would have been applied to the rst\ input, and ground to the backup supply terminal. My guess is that there would not be damaging current flow due to the diodes and switches in the backup supply lines. But that is just a guess. If it works, then all to the good, but ... how critical is it?

    If soldering the crystal to the chip, take care to use a very light touch with the soldering iron. I would glue the crystal lightly to the top of the chip. I'm not sure what objection Chris might have had about soldering it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • bbdelhommebbdelhomme Posts: 14
    edited 2008-04-14 21:05
    Allen,

    Thanks for your comments about pssible damages.

    You can read this Chris Savage comment on his reply posted in 11/13/2006 1:35 PM.
    Chris wrote:
    "I would recommend against soldering the crystal to the DS1302. I have used the DS1302 in dozens of prototypes all on different bread boards and never had any issues. I'm not sure if the RAM circuitry needs the crystal to work or not, but you can rule out the SPI interface if the RAM access is working properly."

    Thanks for your help

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bernard
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-04-14 22:55
    Bernard,

    At the time I posted that an engineer from Dallas Semi looking at one of our boards made the suggestion and recommended against it. It kind of stuck in my head. I don’t even recall the reason though my first thoughts are remembering the stringent crystal layout guidelines they have. Nonetheless, a former tech here had one with the crystal attached and I find myself using it for convenience once in awhile. That said, many people using the chip aren’t necessarily good at soldering and you can destroy the chip and crystal with improper soldering in doing this.

    P.S. – Before I forget…You already posted in another thread with no subject and were asked to edit your message to add one. In the future please do not repost the message. Instead edit your original message to add the subject. Had it not been for so many replies I would have deleted this post. Instead I removed the other this time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2008-04-15 15:56
    The biggest issue is the actual soldering process, to avoid applying too much heat so close to the package, but I think that can be done safely with a small iron and a light touch. Connecting pins to components in mid-air is a time honored technique when high impedances are involved. I seem to remember people having trouble with the DS1302 on a white spring plugboard, with all its stray capacitance, even though they could use the SPI interface and set the time, the time would not advance. I also like the aspect of having the chip and the crystal as one unit, simply one less tiny thing to keep track of.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-04-15 18:41
    I guess the bottom line is if you’re going to experiment with the DS1302 a lot it might be a good idea to make a device as described. Gluing the crystal to the top of the chip first will certainly help when soldering. The leads of these crystals are extremely frail and could be damaged if not careful. As Tracy mentions…use care when applying heat. Now I would not recommend this for a permanent project. The stability of the clock is definitely affected, as I can attest to.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.