I've done similar with the DS1302 and found almost everything I needed is already here.

http://www.picbasic.co.uk/forum/sear...earchid=441378