DS1302 Seconds Register Tech Support helped me with this Thank YOU ( reslo
What Do I need to just read the Seconds Register··as far as· VAR··· and··· CON··· ·?
·I do not want to read it in the BURST MODE
I just want to use the Second Only
Is there a way to do this and how would I do this is there· a DEMO CODE out there on the Forum that·I could·use
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·that you may have and all of your time finding them ![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 6/5/2009 12:22:57 AM GMT
·I do not want to read it in the BURST MODE
I just want to use the Second Only
Is there a way to do this and how would I do this is there· a DEMO CODE out there on the Forum that·I could·use
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
![smile.gif](http://forums.parallax.com/images/smilies/smile.gif)
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 6/5/2009 12:22:57 AM GMT
Comments
Simply send the hex command value $81 and the chip will read the seconds register and you can clock it into your microcontroller.
Page 9 tells you the addresses of all the time registers and their contents:·http://www.maxim-ic.com.cn/pdfserv/en/ds/DS1302.pdf
Post Edited (InSilico) : 5/31/2009 10:34:36 PM GMT
Thank You for your Reply
I try ed this but this only works if you have cap on the DS1302 Chip
When I do this with NO·Cap I only get (80) ·for out put
This is why I ask What VAR and CON
What else·is need to make this work
HIGH CS_1302
SHIFTIN Dio,Clk,LSBPRE,[noparse][[/noparse]secs]
LOW CS_1302
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 6/2/2009 12:23:00 AM GMT
Set_Secs:······················································ ·' DS1302 Write Seconds
· HIGH CS1302················································ ·' Select DS1302
· SHIFTOUT DataIO, Clock, LSBFIRST, [noparse][[/noparse]WrSecs]
· SHIFTOUT DataIO, Clock, LSBFIRST, [noparse][[/noparse]secs]
· LOW CS1302················································ ·' Deselect DS1302
· RETURN
Get_secs:······················································ ·' DS1302 Read Seconds
· HIGH CS1302················································ ·' Select DS1302
· SHIFTOUT DataIO, Clock, LSBFIRST, [noparse][[/noparse]RdSecs]
· SHIFTIN DataIO, Clock, LSBPRE, [noparse][[/noparse]secs]
· LOW CS1302················································· ·' Deselect DS1302
· RETURN
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 6/5/2009 1:13:45 AM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any·
·
·
·
·
Sam
Post Edited (sam_sam_sam) : 6/5/2009 1:19:25 AM GMT