birdbird, I'm going to be honest with you. The code you showed me don't mean that much to me. The thing is that first of all you have to know C language (there's a lot of information about it on the internet). The next thing to do is read the DS1338C datasheet (http://datasheets.maxim-ic.com/en/ds/DS1338-DS1338Z.pdf). If you start reading from page 8, you will find all the information you need to work with the clock. As for the LCD screen (http://www.softbaugh.com/downloads/SBLCDA2_Specification.pdf) it looks like it has a dedicated pin for each segment, so all you need to do is access the right port (depends on how it is connected to your MCU, something similar to driving 7 segment led dispalys).
I can tell you this :
********* Looks like the code needed to start de RTC*********
void IICRTC_InitWrite (void){ //to initialize RTC sets at 8.40am wed
byte i;
while(IICS_BUSY); // Wait till bus is free
IICC_TX = 1; // Transmit Mode
IICC_MST = 1; // Send start bit
IICD = 0b11010000; // Transmit slave address
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
for (i=0; i<5; i++); // Delay
IICD= 0x00; // Transmit word address
******** look at the comments on the right, they tell you what each line does **********
********the next lines seem to fill the registers with the information you want (hour. date...)***
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 00h data (Seconds)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 01h data (Minutes)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 02h data (Hour)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 03h data (Day??)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 04h data (watchdog/alarm registers unused)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 05h data (watchdog/alarm registers unused)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 06h data (watchdog/alarm registers unused)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x10; // Transmit 07h data (set oscillator enable, 1Hz sq. wave output, diable all alarms)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x00; // Transmit 08h data
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0xAA; // Transmit 09h data (Trickle charger circuit, set 1 diode 2kOhm resistor)
for(i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICC_MST=0; // Generate stop signal
}
*** where it says 0xh it means that you are filling register x and the number is in hexadecimal
*** format, and if you look at the DS1338 datasheet, each register is specified as in page 10, table 3
***the rest of the code do what the comments on the right say they do and the function name is important too
void IICRTC_Clear_Flag (void)
{
byte i;
while(IICS_BUSY) ; // Wait till bus is free
IICC_TX = 1; // Transmit Mode
IICC_MST = 1; // Send start bit
IICD = 0b11010000; // Transmit slave address
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
for (i=0; i<5; i++); // Delay
IICD= 0x0F; // Transmit word address (SPR)
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICD= 0x48; // Transmit 0Fh data
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICC_MST=0; // Generate stop signal
}
void IICRTC_set_Pointer_00h(void) //sets the pointer to a register to start reading, for example 01h for minutes.
{
byte i;
while(!IICS_TCF) ; // Wait till transfer is complete
IICC_TX = 1; // Transmit Mode
IICC_MST = 1; // Send start bit
IICD = 0b11010000; // Transmit slave address
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
for (i=0; i<5; i++); // Delay
IICD= 0x00; // Transmit word address
for (i=0; i<5; i++); // Delay
while(IICS_TCF==0); // Wait till transfer is complete
IICC_MST=0; // Generate stop signal
}
What you have to have in mind is that I have no idea about the LC60 IIC interface or the RTC you use. I've jus interpreted the information that the one who wrote the code commented (it's something usefull to do that as in the future you won't remember everything you did at the time you wrote the code).
I know that you wanted something more specific, but I can't help you. You need to find someone that had actually used the RTC you specify and the LCD too and if the mcu is the same one or similar, you are so lucky... But for the moment, my recomendation is to read the RTC datasheet (it explains everything you need to know about I2C to start using the RTC) and the IIC interface (I2C) section of your mcu datasheet. Once you think that the RTC is working (sending an receiving information through IIC), start looking for information on how to drive the LCD screen and some example code might help.
Take into account that 0xXX is hexadecimal notation as xxh. Knowing C language is mandatory if you try to do something like the code you showed before.
Regards.