Aha moment, then AARRGH. DS1307
Gentleman:
···· I had an "Aha moment" with my DS1307. I was able to count minutes and seconds. I left power to my BS2p40 while I made small steps in the edits. However, when I removed power it no longer worked. It displayed a continuous 8080 in sequence (this was where the mins and secs were previously displayed.) I inserted a new chip to make sure I had not toasted one and it again worked. After power was removed, 8080 was displayed again.
This one is ponderous.
···· I had an "Aha moment" with my DS1307. I was able to count minutes and seconds. I left power to my BS2p40 while I made small steps in the edits. However, when I removed power it no longer worked. It displayed a continuous 8080 in sequence (this was where the mins and secs were previously displayed.) I inserted a new chip to make sure I had not toasted one and it again worked. After power was removed, 8080 was displayed again.
This one is ponderous.

Comments
If you want the clock to continue running when power is removed, use a 3 volt coin cell, + on pin 3.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
···· Thanks for the quick reply. It makes sense. I checked the datasheet from DS and sure enough the "control" bit as they call it. I had been working my way down the line and put that into the code. I am going to take another shot at it and see if I can "AHA" again.
Andrew
···· I tried what I could, to no avail. I cannot get the clock to count. I even went back to the original code. This is puzzling. Once I get the code to work I will add the 3v backup to keep it running.
···· Is there any other possibility?
Be sure you have the pullup resistors on the i2c dta and scl lines.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
···· Seems like you are the only one willing to tackle this ponderous situation. Thanks for your help. I am using 4.7k's to pull up 5 and 6. I am actually going by the circuit in this months N&V . I am breadboarding this circuit and tacked the crystal to 1 and 2. I am getting the same response using shiftin and shiftout routines. I am sooo stuck. I think its time to move on. I might try the 1302 next.
Oh yes. I put the button battery on to pin three and ground. Still no response.
Andrew
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
···· I just realized I was typing gentlman, oops. Anyhow, yes it was working earlier. It is working again. I was robbed of my·"aha" moment because it started working mysteriously. I went back to an earlier version of the code I was experimenting with, after a couple of tries it started running.·This time it started right in the middle of the run. The debug was displaying "80...80...( i had a one second pause) then boom, 01....02....03 and so on. Its been counting for 2:13 as of this message. I am puzzled.
·I have had luck with the i2c version of the code. I would like to get the shiftin/out version working for the bs2oem I bought. I have a few weeks to develop this before I pass it on to some students.
Here is a copy of the code I am building on:
'{$STAMP BS2p}
sda CON 8
scl CON 9
seconds VAR Byte
mins VAR Byte
hrs VAR Byte
· startcount:
I2COUT sda, $00,0,[noparse][[/noparse]1]
I2CIN sda,$d0,0,[noparse][[/noparse]seconds]
DEBUG HEX2 seconds, CR
PAUSE 1000
· GOSUB startcount
Thanks again for your help
Andrew
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office