i did many clocks using 8051 :mu:Cs.. well you simple start with an arbitrary delay, let the watch run for a hour or tow, claculate the error, and adjust your delay in the code.. i did it 3 times before my clock was working perfectly.
note, the higher the value of the crystal you'r using, the better precision you'll get...
i have a C code, where i use those those software delays... (but it's messy! do you still want it? )
as far as i am learning, to perform RealTime as it is sayed in the books, you'll have to program it is asm, and calculate the time it takes to execute every single instructions.. (maybe Kyle can do that?)