Here is the altered code with the DS1307 time set line included.
setfreq m8 'you need to set freq. to 8hz to get a 9600 baud
symbol sec = b0
symbol minute = b1
symbol hour = b2
symbol day = b3
symbol date = b4
symbol month = b5
symbol year = b6
symbol control = b7
symbol fullyear = w6
serout 7,T9600_8,(254, $01) 'Clear Screen
hi2csetup i2cmaster,%11010000,i2cslow_8,i2cbyte
Main:
' To sets clock in 12 hour mode
'hi2cout 0, ($00, $07, %01110010, $02, $17, $03, $09, $10)
'DS1307 CODE
pause 2000
Timedate:
hi2cin 0, (sec,minute,hour,day,date,month,year,control)
'Day Of The Week Conversion
bcdtoascii day,b8,b9 ' Day of the week
If b9 = "1" then serout 7,T9600_8, (254, 128, "Sun")
elseif b9 = "2" then serout 7,T9600_8, (254, 128, "Mon")
elseif b9 = "3" then serout 7,T9600_8, (254, 128, "Tue")
elseif b9 = "4" then serout 7,T9600_8, (254, 128, "Wed")
elseif b9 = "5" then serout 7,T9600_8, (254, 128, "Thu")
elseif b9 = "6" then serout 7,T9600_8, (254, 128, "Fri")
elseif b9 = "7" then serout 7,T9600_8, (254, 128, "Sat")
EndIf
'Time
bcdtoascii hour,b8,b9 ' Hours
serout 7,T9600_8,(254, 132, b8,b9,":")
bcdtoascii minute,b8,b9 ' Minutes
serout 7,T9600_8,(254, 135, b8,b9,":") '
bcdtoascii sec,b8,b9 ' Seconds
serout 7,T9600_8,(254, 138, b8,b9)
'Date
bcdtoascii month,b8,b9 ' Month
serout 7,T9600_8,(254, 192, b8,b9,"/") 'Sets Date to line 2 position 1
bcdtoascii date,b8,b9 ' Date
serout 7,T9600_8,(254, 195, b8,b9,"/") 'Sets Date to line 2 position 4
bcdtoascii year,b8,b9 ' Year
serout 7,T9600_8,(254, 198, b8,b9) 'Sets Year to line 2 position 7
goto Timedate