Hi Jack,
1. The DS1307 needs a crystal with a 12.5pf load. That part # is DigiKey SE3201-ND or SE3202-ND or SE3203-ND. The difference between them is physical size with the 3201 being the largest and the 3203 being the smallest and the more expensive. 3201 and 3202 are $.27 in single lot and the 3203 is $1.38 single lot. You can find them on page 1135 of their current catalog.
2. RTCsec came from the MN1307 program. You have your "secs" register which is the same thing.
3. If I were you, at this point, I would strip the program down and only put the LCD items in there first, make sure the LCD works, then I would add just the clock stuff. I have attached a DS1307 program I got off of another PIC group. I do believe our own Darrel Taylor was a part of the discussion on getting the clock chip to work. When you look at this program you will see that there are RTC register assignments as constants. You don't seem to have them in what you posted here. This may be part of the problem. This listing I have attached is very close to what I have for my DS1337 program. Try this program just with the LCD portion of your program and see if it doesn't get you going. You shouldn't have to make any pin assignment changes. SDA and SCL are the same pins.
You can set the time values to your current time, just make sure the secs are set to $00.
You're having fun.... you just don't know it. This programming stuff is frustrating as all hell but once you get it to work you won't forget it!
HTH,
BobK
Let me know how this works for you.




Bookmarks