Sub DS1320timer_Tick()
'The current time must be defined in the sub. The global can not be used.
Dim currenttime As DSTime
currenttime = DS1302.CurrentTime
Years = currenttime.years
Months = currenttime.Months
DayOfMonth = currenttime.DayOfMonth
Hours = currenttime.Hours
Minutes = currenttime.Minutes
Seconds = currenttime.Seconds
DayOfWeek = currenttime.DayOfWeek
TimeTicks= TimeTicks + 1
Dim Yr As ULong = (Years) * (360) * (24) * (60)
Dim Mn As ULong = (Months) * (30) * (24) * (60)
Dim Dy As ULong = (DayOfMonth) * (24) * (60)
Dim Hr As ULong = (Hours) * (60)
MinutesSerial = Yr + Mn + Dy + Hr + Minutes
Log ("Current Date Time:",Years,"\",Months,"\",DayOfMonth,"-",Hours,":",Minutes)
Log ("Minutes Products:",Yr,"-",Mn,"-",Dy,"-",Hr,"-",Minutes,"-",MinutesSerial)