Shop OBEX P1 Docs P2 Docs Learn Events
DS1302 won't start — Parallax Forums

DS1302 won't start

MoskogMoskog Posts: 554
edited 2009-01-06 20:55 in BASIC Stamp
Well I was about to include the time chip DS1302 to my project and read carefully Chris Savage's story and downloaded the demo code at
http://forums.parallax.com/showthread.php?p=531080
I printed out the connection image to be sure the connections should be correct.

I set up the very simple circuit·on my Board of Education, added two 1.5V alcalines and used the green Stamp.

But no response. I have checked and re-checked the connections, even used a ohm meter to be sure·that the connections are OK between the 1302 and the Stamp.

I have also tried a different Stamp, a different 1302 and also a different x-tal.

One thing that I don't know for sure is the X-tal connection.
I put it on the breadboard as close as I can to the 1302, the ohm shows OK but is it good enough?

After doing the inputs (setting the clock), resetting the stamp and trying to show the time, the DEBUG screen prints:

RESET Stamp to return to menu.
·FF/FF/FF 5F:FFPM [noparse]/noparse]F0

Whatever I do I get this.

I know Chris mentioned that solder the x-tal to the pins on the chip was not the best to do if I understand him correct, better solder it close to. But I thought I could put it in the holes on the breadboard next to, during this test periode.
The x-tal has the correct value, the only thing I cant remember for sure is the pF value, looking back in my Jameco catalog (I do think I bought part no 14584) I see there is a chance that the x-tal imped. is 10.5pF. Will that make·serious trouble?

Any hope for me at all?


·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-05 20:10
    If you’re very good at soldering and are not committing the project to something important you can tack the crystal to the leads for simple testing. I would never recommend it for an application. In any event it does seem as though you may be having a connection issue with the crystal. What are the 1.5V cells for and where are they connected? Also, is the DS1302 ground common with the BASIC Stamp ground (VSS)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • MoskogMoskog Posts: 554
    edited 2009-01-05 20:22
    Well, the cells are just for backup, I used two of them (3V) and they are connected to pin 8 and Vss. The 1302 is also connected to the Vss on the breadboard, that should also be good grounding with the BS2.
    The soldering itself shouldn't be any problem, maybe I should solder the x-tal to eliminate that potential problem? Is there any ways to check the pF value and is it important at all if its not the recomended 6pF?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-01-05 20:40
    Pin 1 should be connected to VDD...I don't see any reason why the crystal would have the wrong series resistance unless you got it from somewhere other than Parallax. In any event see what happens without the batteries connected.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2009-01-05 21:09
    Moskog,
    ·
    The DS1302 is pretty sensitive to parasitic capacitance.· Using a·Solderless-Bread-Board·in combination with a 10.5pF load rather than a 6pF load might be enough to kill the oscillator.
    ·
    Regardless of the crystal condition, you should still be able to read and write to the general purpose RAM.· This will at least confirm that you are properly connected to the DS1302.
    ·
    ·
    ·
    If you don't want to solder the crystal to the pins, then you can use a·8-DIP socket and compression fit the leads to the crystal in-between the socket and the IC.· You can also clip the socket terminals so that they don't insert into the breadboard during testing. (See Image)
    ·




    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    1024 x 512 - 50K
  • MoskogMoskog Posts: 554
    edited 2009-01-05 21:14
    I've got the crystal from Jameco Electronics in the USA. Not from Parallax. Pin 1 on the 1302 is connected to Vdd and I tried without the backup cells too, without any better results. Seems I am stuck right now but I will sleep on it and give it another try tomorrow night.
    Thanks anyway, Chris for your suggestions, If I can't figure out this I better try Parallax' crystals.
  • MoskogMoskog Posts: 554
    edited 2009-01-05 21:21
    Beau Schwabe, you think there is a chance I killed the 1302, well you are probably right.
    I do think the read/write thing on the demo program works so its probably the oscillator thats gone.
    Thanks for advice on mounting the 1302 and the x-tal.
    Guess I should order new 1302 and also new x-tals from Parallax.

    Thanks again and good night!
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2009-01-05 21:44
    Moskog,

    The added capacitance is killing the oscillator... remove that and the DS1302 should be fine. I think you might have too much load capacitance on the crystal and it's preventing it from oscillating. Think of it this way.. the DS1302 is designed to keep time under very low current and power requirements. If there is too much load, the driver simply doesn't have enough oomph!@ to allow the oscillator to wiggle.

    What I was saying about read/writing to RAM... that part of the IC should work regardless if you have the crystal plugged in or not. If you can write a specific value to the RAM, and then retrieve the correct value, then you know you have things hooked up properly to the DS1302.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • MoskogMoskog Posts: 554
    edited 2009-01-06 20:55
    It looks like there is something wrong with the 1302 though, when sending different numbers to RAM I only receive 240 whatever number I send and to whatever location on RAM.
    I tried to change pins on the BS2 from P0, P1 and P2 to P10, P11 and P12. Now I receive 248 each time.

    I tried to isolate the pin 2 and 3 from the breadboard and also soldered the crystal to the same pins without any better results.
    I really have no better ideas then that I most have killed my time chips, have no ideas on how I did it, the wiring on the breadboard is so simple there is no chance to do that wrong.

    Now I have calmed down a bit and also ordered new time chips and new crystals from Parallax.
Sign In or Register to comment.