DS1302 displays 00/00/00 00:00:811
Dont undestand why my·DS1302_Demo.bs2 wont work cant set time,or date. I can write· to the ram so It seems to be conecting to the chip. Thanks David
Post Edited (dbj) : 11/12/2006 4:44:47 PM GMT
Post Edited (dbj) : 11/12/2006 4:44:47 PM GMT
Comments
I have used it with no problems. Check your Crystal connections - the leads are quite small for proto boards - I usually put the leads in the same holes that pins 2 & 3 of the 1302 plug in to, then plug the 1302 in, to assure a good connection.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
CLOCK HALT FLAG
[/font]Bit 7 of the seconds register is defined as the clock halt (CH) flag. When this bit is set to logic 1, the clock oscillatoris stopped and the DS1302 is placed into a low-power standby mode with a current drain of less than 100nA. When this bit is written to logic 0, the clock will start. The initial power-on state is not defined.
·Thanks David
Post Edited (dbj) : 11/13/2006 1:11:53 AM GMT
I had this problem when I frist started playing with this chip if you are getting 00:00:80
this is One of Two thing
#1 check and see that you have the pins to the Right Pins Statement
DS1302 Chip Basic Stamp
If you hook up your pins this way This is the way that
I have it hook up on mine
*******These pin # may not Right on the DS1302 Chip*************
How ever they are the pins that hoop up to the
*******Basic Stamp to the DS1302 Chip......................*************
-1 .......................P0
-2 .......................P1
-3........................P2
-4 Not Used
If you use the demo code that is for the DS1302 on the forum
this would be 1.0.2 in that order not 0.1.2
This is how the DS1302 Demo code is setup
-1........................P1
-2........................P0
-3........................P2
-4 Not Used
#2 You must have the pins on the DS1302 solder to the 32.768 crystals pins or this will also give you this problem this took me awhile to figur this one out
I hope this help you out
Have fun playing with this chip
Sam
Post Edited (sam_sam_sam) : 11/13/2006 6:35:56 PM GMT
RE: #2 You must have the pins on the DS1302 solder to the 32.768 crystals pins or this will also give you this problem this took me awhile to figur this one out
You really don't need to solder the crystal to the 1302 - you DO need to be sure they are making good contact. This can be tricky on some proto boards (well used ones, especially).
This is why I recommended putting the crystal leads in the holes that the 1302 pins 2 & 3 go in to THEN gently push the 1302 in place. This will assure the crystal leads make good contact with the 1302 pins AND allows the circuit to be disassembled as needed.
Post Edited (Paul Sr.) : 11/13/2006 6:50:53 PM GMT
·· 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.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
How do·you hook up·a DS1302 Chip to crystals pins· Is this what you are talking about
This is why I recommended putting the crystal leads in the holes that the 1302 pins 2 & 3 go in to THEN gently push the 1302 in place. This will assure the crystal leads make good contact with the 1302 pins AND allows the circuit to be disassembled as needed.
·························································································
Now i have not tried doing it this way
·But i will try it the next time i use a DS1302 Chip
·Thanks for recommending a better way of do this i will give this a try and let you know what happen
I learn something new ever so often·I know it hard to teach an old dog new tricks················· ·
Sam
Yes, you got it. Putting the Xtal leads in the same holes as the 1302 pins makes for a very good connection. You just need to be careful not to break the leads off the Xtal.
Post Edited (Paul Sr.) : 11/14/2006 1:18:38 PM GMT
·
·· On many breadboards that may not work properly.· The pins on the IC are much thicker than the crystal leads.· When you put the crystal into the same set of holes as the IC pins are in, they will not close onto those smaller leads, but rather they will be held apart by the thicker pins on the IC.· It is for this reason we recommend using the next set of holes out from the IC.· If the breadboard is in good condition, the crystal leads will make good contact that way.· Whenever you try to put two leads into the same hole the thicker lead will get a good connection, while the thinner lead will not.· This is due to the way most breadboards work, which is they have two parallel strips of metal which run along a given row.· There are usually notches between them so that they don’t affect other holes on the same row.· But on a given hole the two pieces of metal will expand to the thickness of the larger pin/lead.· Since the strips run perpendicular to the IC, there really is no easy way to make this work.· The only way I could see it possibly working is if you have a really expensive breadboard which has the 4 strips/hole, which are rare.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Thanks for the insight - I hadn't thought about how the BB was interconnected. I was having strange issues while experimenting and decided it was because the Crystal leads weren't making full contact. I then moved it to the same pins as the DIP and haven't had problems since. The leads SEEMED to be in there very tight - I guess I have been lucky!
Paul
·
· ·Yes, I have tried·this way·before and found that if the IC leads are pushing outward (which they usually are) then they may push against the plastic holes with enough force to make contact.· This is a pressure connection of metal against plastic, which will often work, but many of the well-handled ICs we have laying around here do not have the cleanest leads so that type of connection doesn’t work well.· But when individual leads are inserted into the holes, they make a metal to metal connection with friction which tends to clean the edge of the lead.· And since it is the wide part, it makes a bigger difference.· Obviously the crystal leads are typically round and won’t necessarily be as big a difference, but I wanted to save anyone hair pulling I have gone through.· Years ago I couldn’t afford a large breadboard and did sometimes force multiple leads into a hole to make things fit.· It always caused problems at some point.· Anyway, the advice and experience of others is always appreciated, and your points were well-taken.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support