Pdb-ds1307
MikeS
Posts: 131
I have tried two different programs for the DS1307 on my PDB and it appears that the chip my be faulty. I get the same results with both programs using a BS2 and a BS2Pe. I can set the time to 6:00:00 via the programs and change the hrs and min by pressing the two buttons but time will not update on the debug screen. If I remove power from the PDB and run either program the last time I set the DS1307 to will be retained. I am using P0 and P1 for SDA and SLC respectively and using two of the pushbuttons on the PDB on P2 and P3. Anyone got any ideas on what to try before I conclude the chip is faulty?
Thanks,
Mike S
Thanks,
Mike S
BSP
5K
Comments
Do make sure you don't have a wiring hiccup somewhere, as that could contribute to the·problem and explain the same behavior with two different BS2 modules.· Finally, you might try enabling the SQW output from the DS1307 and monitoring it;·that would show you that the crystal circuit is working (or not).·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I tried your square wave program and got nothing back on the debug screen. Put the opti-scope on the line and could not see anything. I guess the 1307 is bad.
Thanks for your help
Mike S
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
I'm not sure how the PDB is wired. The chip oscillator will not run until the seconds register, bit 7, is set to zero. But you have done that. The serial interface will not work unless the battery backup line is at a voltage level of 3.6 volts or less. But your serial interface is working fine, so that can't be the problem.
It is much more likely that the problem is the 32khz xtal, not the DS1307. Those crystals are relatively fragile. The chips are quite robust in comparison. One thing that can fry the DS1307 is, if the backup battery is hooked up backwards.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com