> Please understand that I'm not trying to be you on the spot or > anything -- I'm just trying to better understand this thread so that > I could offer any help to you (if I'm able to). I've worked with the > Philips PCF8563 RTC in the past. In my case, I did not have the > liberty to use large-value pull-ups since serial EEPROMs were > also connected to the I2C bus. > > Best regards Joe, > > Ken Pergola Thanks for your comments Ken. I have been trying to get back to the circuit, but time didn't permit. Although it's an important part of the project in the long-term, right now it isn't and there are other things that need to be done to show the customer that I'm making progress. ie he will appreciate data flying about on an LCD, but not that I've spent a week looking into I2C etc, even though it had to be done I'm wondering whether because so many ICs now have very low sleep currents and that it's expected an IC like the PCF8593 will not be the last man standing in a circuit, but would be connected to a buss that is asleep but not dead. I'm hoping to get the iron back out in the next day or two One other thing I did manage to fit in was to try out TB028, which converts Day to a day number 0 - 7 (=Sun - Sat) in AccValue. This is not strictly needed for my application but it gives just that little bit more feedback for the user. It appears to work, although I'd like to tidy it up at some stage. Note that the Valid Date routine has been ditched because my source cannot supply bad dates/times http://ww1.microchip.com/downloads/en/AppNotes/91028a.pdf ;================================================ ; Calculate day of week TB028 (18F452 version) ;================================================ cblock 0x0580 YearHi YearLw Month Day AccValue TempA TempB TempYH TempYL Lbyte Hbyte Ltemp Htemp TempH endc cdow movlb .5 ;use bank5 RAM ;example ; mov 0x20,TempA ;date = 4th July 2004 ; mov 0x04,TempB ; mov .7,Month ; mov .4,Day call BCDtoBin movff Lbyte,YearLw movff Hbyte,YearHi call get_day return get_day clrf AccValue mov 0xc6,TempYL mov .7,TempYH getday0 call CompYear skpnz bra getday1 incf AccValue call IsLeapYr skpnz incf AccValue call IncTemp bra getday0 getday1 movlw .3 subwf Month,w skpc bra getday2 call IsLeapYr skpz bra getday2 incf AccValue getday2 mov 0x1a,pclath rlncf Month,w call Mnth_val addwf AccValue movfw Day addwf AccValue call modula7 return modula7 movlw .7 subwf AccValue,w skpc bra modula70 movlw .7 subwf AccValue bra modula7 modula70 movff AccValue,TempH return CompYear movfw YearHi subwf TempYH,w skpz return movfw YearLw subwf TempYL,w return IsLeapYr btfsc TempYL,0 bra NotLeap btfsc TempYL,1 bra NotLeap setz return NotLeap clrz return IncTemp incfsz TempYL return incf TempYH return BCDtoBin clrf Htemp clrf Ltemp clrf Lbyte clrf Hbyte swapf TempA,w call Mpy10 movfw TempA call Mpy10 swapf TempB,w call Mpy10 movfw TempB andlw 0x0f addwf Lbyte skpnc incf Hbyte return Mpy10 andlw 0x0f addwf Lbyte skpnc incf Hbyte clrc rlcf Lbyte,w movwf Ltemp rlcf Hbyte,w movwf Htemp clrc rlcf Lbyte rlcf Hbyte clrc rlcf Lbyte rlcf Hbyte clrc rlcf Lbyte rlcf Hbyte movfw Ltemp addwf Lbyte movfw Htemp addwf Hbyte return org 0x1a00 mnth_val addwf pcl retlw .0 ;filler retlw .0 retlw .3 retlw .3 retlw .6 retlw .1 retlw .4 retlw .6 retlw .2 retlw .5 retlw .0 retlw .3 retlw .5 -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics