English
Language : 

MC9S08SG32 Datasheet, PDF (201/328 Pages) Freescale Semiconductor, Inc – HCS08 Microcontrollers
RTCSC.byte = RTCSC.byte | 0x80;
/* RTC interrupts every 1 Second */
Seconds++;
/* 60 seconds in a minute */
if (Seconds > 59){
Minutes++;
Seconds = 0;
}
/* 60 minutes in an hour */
if (Minutes > 59){
Hours++;
Minutes = 0;
}
/* 24 hours in a day */
if (Hours > 23){
Days ++;
Hours = 0;
}
}
Chapter 13 Real-Time Counter (S08RTCV1)
MC9S08SG32 Data Sheet, Rev. 7
Freescale Semiconductor
201