DS1302 Real Time Clock - BASIC Stamp 2 interface
Rich36
Posts: 3
I am trying to get the DS1302 Real Time Clock chip to work with my Basic Stamp 2 Board of Education. I am sure that the hardware is wired correctly and I am sure the 2 programs I've tried are correct. (One program I downloaded from this Parallax forum.)
One of the things I questioned is the installation of the 32.768kHz Crystal. I have it plugged in the BOE next to pins 2 and 3 of the DS1302. Would this create enough capacitance to load the crystal down and not operate correctly? Is anyone experienced with the DS1302 interface? Any suggestions?
Thanks,
Rich
One of the things I questioned is the installation of the 32.768kHz Crystal. I have it plugged in the BOE next to pins 2 and 3 of the DS1302. Would this create enough capacitance to load the crystal down and not operate correctly? Is anyone experienced with the DS1302 interface? Any suggestions?
Thanks,
Rich
Comments
Regards,
John Twomey
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
You can try trimming the leads on the crystal and then plug it into the same holes as the chip's leads, or bend the leads upward and solder the crystals leads directly to the chips pins.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick
Note that pins 2 and 3 of the chip have been cut off short. They are dedicated to the crystal and not plugged into anything else. The crystal is held on top with a little dab of glue.
This is from a recent thread in Stamps in class:
http://forums.parallax.com/showthread.php?p=712670
and
http://forums.parallax.com/showthread.php?p=712702
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
My next step is to order another chip and crystal from another source.
Thanks again,
Rich
Please check If you hooked·it up this way .........>>>>>>>>>>>>>
The way i hooked it up
Then you will have to change two pin # around like this and it will work
When you hooked up the DS1302 Chip to the Basic Stamp I/O Pins let say 0,1,2 did the three pin 6,7,8··Of the time chip
BS pin # 0·to TC pin # 6···················································· ··Data IO········ ·· PIN·· ···1·······' DS1302.6 ..> These are changed from the demo
BS pin # 1·to TC pin #·7····· TC = DS1302 Time Chip Pins #······Clock············ ·PIN·····0·······' DS1302.7· ..> These are changed from the demo
BS pin #·2 to TC pin # 8····· BS = Basic Stamp Pins #··············CS1302········· ·PIN·····2·······' DS1302.5
This the way the Demo is set up and if you hook up the right way it will work
·Pin Assignment
·0·· DS1302 DataIO············· DataIO········· PIN·····0············· ' DS1302.6
·1·· DS1302 Clock··············· Clock·········· ·PIN·····1··············' DS1302.7
·2·· DS1302 Chip Select······· CS1302·········PIN·····2··············' DS1302.5
This is the mistake i made when i first started using the DS1302 and still hook it this way because it is easy hook up·pin to pin and do not have to cross pins and have wire to do it I just have to remember change the pins #
I hope this helps
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/12/2008 11:48:09 AM GMT
I purchased a kit for a simple RTC·board from a US company (Bay Point Engineering) on eBay. Soldering a pin header to the underside gave a board which can easily be plugged in to the BOE and is easy to wire up. It works perfectly with the DS1302 programs found on the Parallax website and these can be modified to display time and date in different formats, to add a serial LCD etc.
I have found it very accurate in maintaining the time using the battery back-up. A photo of the set up is attached.
John
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Manxstamp,
Isle of Man, British Isles
Like sam_sam_sam says, it is important to match the program pin numbers to the DS1302 pin numbers.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
YOU MUST ENTER ALL FIELDS
Here are·each step that is need to SET·the TIME and DATE
"Press 1 to Set Date/Time."·· Just PRESS 1
"2 to Display Date/Time.
"3 to Set/Read DS1302 RAM."
"RESET Stamp to return to menu."
When you input the date and time this is what it would look in the window at the top of the debug window you see what you type
This is what it would look like if you input what i have here
1080313610110
2
"Enter 2 digit year, i.e. 05 = 2005:" ' Set Year······································08···················
"Enter 2 digit month, i.e. 03 = March:" ' Set Month····························· · 03
"Enter 2 digit date, i.e. 02 = 2nd:", ' Set Date···································· ·13
"Enter day of the week as a number 1-7",
"1=SUN, 2=MON, 3=TUE, 4=WED, 5=THU, 6=FRI, 7=SAT", ' Set Day······· ·6
"Enter 1 for 12 Hour Mode or 0 for 24 Hour Mode:",
"Enter 2 digit hour, 00-23:", CR ' Set Hours (24 Hour Mode)··················· --
"Enter 2 digit hour, 01-12:", CR ' Set Hours (12 Hour Mode)···················· 10
"Enter 0 for AM, 1 for PM:", CR ' Set AM/PM Flag··································· 1
"Enter 2 digit minutes, 00-59:", CR ' Set Minutes·································· 10
Press ENTER·to SET TIME AND DATE
"Press 1 to Set Date/Time."··
"2 to Display Date/Time.·· Just PRESS 2
"3 to Set/Read DS1302 RAM."
"RESET Stamp to return to menu."
After you·PRESSed ·2 and your time and date should be there
I·tryed the same Demo·I hope that i have each step that is need·
I hope this help you to get it to work
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 3/14/2008 5:20:29 AM GMT