I was going to rewrite everything for you, but then you wouldn't learn anything and we'd be here for months.
Look at your code as you've written it. Look at it as a bunch of blocks of code instead of lines. Look at the structure of it. Follow your code thru. You'll see that it never gets a chance to loop around and around the way you probably want it to. I see a couple of GoSub's without RETURNs (very bad idea!). # of Gosubs = # of Returns.
You've got the jist of it, the idea is ok. The reading and writing of the 1307 probably won't work, don't know...but that's beside the point at the moment. Try putting all of your subroutines at either the start of the program and jump over them to a 'main loop'.
While your at it, do a search here on the site for DS1307 and you'll find a load of hits for program ideas.
Bookmarks