PDA

View Full Version : DS1302 demo code question



cdm13
04-10-2007, 03:29 PM
Hi Everyone,

I am using the demo code for the DS1302 that Chris Savage has posted here.
I have followed the schematic and am able to input the date and time.

When I try to display the current time and date, all I get are zeroes.

Could there be an easy fix?

Curtis

Chris Savage
04-10-2007, 11:20 PM
Curtis,

Most likely there is an issue with the wiring of the DS1302 or a problem with the Crystal. Have you re-checked your connections? They should match the connections in the code.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support

cdm13
04-12-2007, 03:25 PM
Chris,



Thanks for the tips, I've got the DS1302 working now.

Is it possible to gain resolution to x.xx seconds as a stopwatch function.

I did see your other sample counter code, but that was only to 1 second resolution.



Thanks

Curtis

Chris Savage
04-12-2007, 11:26 PM
Curtis,

The limitation is not the code but the DS1302. Most RTC chips have 1 second resolution. If you had an RTC with higher resolution you could do that. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support