@ Steve
I think I may have found the problem ....
It looks like I am using a 32.768 Mhz Crystal not a 32.768Khz one!
Will get 32.768 Khz crystals tomorrow and confirm :-)
Thanks a million for the info thus far :-)
Kind regards
Dennis
@ Steve
I think I may have found the problem ....
It looks like I am using a 32.768 Mhz Crystal not a 32.768Khz one!
Will get 32.768 Khz crystals tomorrow and confirm :-)
Thanks a million for the info thus far :-)
Kind regards
Dennis
Ahhh, yes... the wrong xtal would do it.
No amount of fooling with code and registers will help if the hardware is broken.
Last week I spent 2 hours looking over a data sheet to see what registers and settings were wrong when I couldn't get a new circuit to work.
The problem turned out to be 1 unsoldered pin on a 44TQFP part...
Let us know how it goes with the right xtal.
steve
YAY it works :-)
@ Steve .... :-) so easy to miss a pin soldering sometimes or on a breadboard test even forget to put the PIC back into its socket after programming and then watching a blank serial debugger screen :-)
I remember years back in a PC workshop two of the technicians ,on inspection of a 'DEAD PC' that just arrived in, meticulously tested and replaced every component and card (drives,motherboard ,etc) in the PC including the case, eventually out of sheer frustration they called me in to check why it was still dead and the customer had been waiting nearly two weeks for their PC.
I checked the power cable first ... it was plugged into the PSU but it was on a long workbench so I followed the cable to its source... and there was the problem ...the mains switch for the wall plug was OFF :-)
Sometimes even the obvious is not so obvious and often we are in a huge rush, excited to get to the end result as soon as we can.
Thanks Steve and everyone else for all the help so far, I really appreciate it !
Kind regards
Dennis
@Steve
To add an alarm(s) , would I just store a date and time in flash and then use an IF ..THEN statement as a matching trigger ?
Kind regards
Dennis
Hi Dennis,
You could do that or you could use the DS1337 that has 2 alarms built-in.
The DS1337 uses I2C communications and can be configured in several
different ways. Several years ago, Tony Galea presented an entire program
using the DS1337. Recently, JEllis posted his trials setting up this clock.
It doesn't have a battery charger like the DS1302 but it does have two separate alarm outputs. If you only need one alarm and need a 1hz pulse, the DS1337 will fill your needs. Check out the data sheet. I use alot of them and have a backup battery circuit for them.
HTH,
BobK
Or you could just use a 18F46J50 that has a RTCC built in.
*None* of that serial communications junk that way, eh?
I still continue to use the DS1302 for a lot of projects because I LIKE the "keep alive battery" and charger...
Bookmarks