Now that you have it worked out, here is what I do, following the 2nd approach I outlined earlier.
//write dat to addr
void rtc_write(unsigned char addr, unsigned char dat) {
digitalWrite(RTC_CS, LOW); //select the chip
digitalWrite(RTC_RW, HIGH); digitalWrite(RTC_DS, HIGH); //ds/rw high
digitalWrite(RTC_AS, HIGH); //as high
RTC_ADDR_PORT = addr; //output the address
RTC_ADDR_DDR = 0xff; //addr as output
digitalWrite(RTC_AS, LOW); //latch the address
RTC_DELAY(); //Pwel 150ns
digitalWrite(RTC_RW, LOW); //enter write mode
RTC_ADDR_PORT = dat; //write the data
RTC_DELAY(); //Pwel 150ns
digitalWrite(RTC_RW, HIGH); //write the data
digitalWrite(RTC_AS, HIGH); //latch the whole thing
digitalWrite(RTC_CS, HIGH); //unselect the chip
RTC_ADDR_DDR = 0x00; //adr pins default to input
}
The timing follows the datasheet.
The rtc_read() routine is very similar. You can then build your whole interface based on the read/write routines.