As the DS12887 uses multiplexed Address/Data bus the easiest way to control it is with a microcontroller that has such a bus ..
One of good candidates for this job is 8051-based microcontroller such as for example the AT89S52 (AT89S2582) ..
Here is info on how to connect this RTC with 8051-core microcontroller:
**broken link removed**
**broken link removed**
I don't think there is an off-the-shelf code that'll cover your application ..
Start with this simple ASM code which is good for initial test of the 8051-DS12887 circuit .. **broken link removed**
Call Set_time
Adress = Adress - 2
Loop Until Adress = 0
Do
Call Call_time
Wait 1
Loop
Sub Call_time
Adress = 4
Call Get_time
H = Data_in
Adress = 2
Call Get_time
M = Data_in
Adress = 0
Call Get_time
S = Data_in
'Locate 1 , 1
'Lcd Makedec(h) ; ":" ; Makedec(m) ; ":" ; Makedec(s)
S1 = Makedec(s)
'If S1 > 9 Then
'S1 = S1 - 8
'End If
'If S1 > 20 Then
'S1 = S1 - 18
'End If
'If S1 > 30 Then
'S1 = S1 - 28
'End If
'If S1 > 40 Then
'S1 = S1 - 38
'End If
'If S1 > 50 Then
'S1 = S1 - 48
'End If
Select Case S1
Case 0 : Porta = &B01111110
Case 1 : Porta = &B00110000
Case 2 : Porta = &B01101101
Case 3 : Porta = &B01111001
Case 4 : Porta = &B00110011
Case 5 : Porta = &B01011011
Case 6 : Porta = &B00011111
Case 7 : Porta = &B01110000
Case 8 : Porta = &B01111111
Case 9 : Porta = &B01110011
End Select