Well,
I'm still making some mistake somewhere.
The display says now "55:55:55".
If I bypass the I2CWRITE and I2CREAD commands, everything is fine 
Code:
'-------------------------------------------------------------------------------
' PIC 16F690 Fuses (MPASM)
@ __Config _FCMEN_OFF &_IESO_OFF &_CPD_OFF &_WDT_OFF &_HS_OSC &_BOR_OFF &_CP_OFF &_PWRTE_OFF &_MCLRE_OFF
'-------------------------------------------------------------------------------
' Registers 76543210
OPTION_REG = %10000000 'PORT A&B Pull-Ups disabled (look WPUA & WPUB) INTEDG rising edge on A2
'OSCCON = %01100000 'Internal RC set to 4Mhz - not to be used with XTal
ANSEL = %00000000 'Analog inputs Channels 0 to 7
ANSELH = %00000000 'Analog inputs Channels 8 to 11
ADCON0 = %00000000 'A/D Module is OFF
CM1CON0 = %00000000 'Comparator1 Module is OFF
CM2CON0 = %00000000 'Comparator2 Module is OFF
INTCON = %00010000 'INTerrupts CONtrol
TRISA = %00000100 'Set Input/Output (0 to 5)
PORTA = %00000000 'Ports High/Low (0 to 5)
TRISB = %00010000 'Set Input/Output (4 to 7)
PORTB = %00000000 'Ports High/Low (4 to 7)
TRISC = %00000000 'Set Input/Output (0 to 7)
PORTC = %00000000 'Ports High/Low (0 to 7)
'-------------------------------------------------------------------------------
' Defines
DEFINE OSC 4
'-------------------------------------------------------------------------------
' Variables
SQW VAR PORTA.2 ' RTC 1Hz output
D_Out VAR PORTB.7 ' serial data out
SCL VAR PORTC.0 ' RTC clock
SDA VAR PORTC.1 ' RTC data
RTC_Sec VAR BYTE ' Seconds (00-59)
RTC_Min VAR BYTE ' Minutes (00-59)
RTC_Hou VAR BYTE ' Hours (00-23)
D_Bps CON 16468 ' 9600 Driven Inverted None
'-------------------------------------------------------------------------------
' Initialize
PAUSE 1000 ' power-up serial-LCD
SEROUT2 D_Out,D_Bps,[27,"C",0] ' set serial-LCD cursor OFF
SEROUT2 D_Out,D_Bps,[27,"L",0] ' set serial-LCD backlight OFF
'-------------------------------------------------------------------------------
' Program
ON INTERRUPT GOTO Read_DS1307
MAIN:
GOTO MAIN:
END
'-------------------------------------------------------------------------------
' Interrutp Service Routine
DISABLE
Read_DS1307:
I2CREAD SDA,SCL,$D1,$00,[RTC_Sec,RTC_Min,RTC_Hou]
' Convert Hex coded to decimal
RTC_Sec = (RTC_Sec & $F)+((RTC_Sec >> 4)*10)
RTC_Min = (RTC_Min & $F)+((RTC_Min >> 4)*10)
RTC_Hou = (RTC_Hou & $F)+((RTC_Hou >> 4)*10)
' Write to external memory
I2CWRITE SDA,SCL,$A0,$00,[RTC_Sec,RTC_Min,RTC_Hou]
PAUSE 10
'Read from external memory
I2CREAD SDA,SCL,$A0,$00,[RTC_Sec,RTC_Min,RTC_Hou]
SEROUT2 D_Out,D_Bps,["Time: ",DEC2 RTC_Hou,":",DEC2 RTC_Min,":",DEC2 RTC_Sec,13,10]
INTCON.1 = 0
RESUME
ENABLE
Bookmarks