I have a Timer project using AVR and DS1307 RTC.
In this project users Set OnTime (OnHour : OnMinute) and Duration DTime(DHour : DMinute).
When time reach to Ontime the PORTTB.7 will set, and after "DTime" it will clear.
It's easy to use "if" statement to check the OnTime and DTime but i need help to use simple and usefull trick to handle the output when OnTime+DTime bigger than 24:00 or OnMinute+DMinute bigger than 60`
Please notice that we have 2 variables for each time duration (Hour, Minute).
Any comment appriciated;