![NXP Semiconductors MC9S08LG16 Reference Manual Download Page 305](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08lg16/mc9s08lg16_reference-manual_1721837305.webp)
Chapter 14 Real-Time Counter (S08RTCV1)
MC9S08LG32 MCU Series, Rev. 5
Freescale Semiconductor
305
#pragma TRAP_PROC
void RTC_ISR(void)
{
/* Clear the interrupt flag */
RTCSC.byte = RTCSC.byte | 0x80;
/* RTC interrupts every 1 Second */
+;
/* 60 seconds in a minute */
if (Seconds > 59){
+;
Seconds = 0;
}
/* 60 minutes in an hour */
if (Minutes > 59){
Hours++;
Minutes = 0;
}
/* 24 hours in a day */
if (Hours > 23){
Days ++;
Hours = 0;
}
}
Summary of Contents for MC9S08LG16
Page 2: ......
Page 4: ......
Page 8: ......
Page 20: ......
Page 26: ...Chapter 1 Device Overview MC9S08LG32 MCU Series Rev 5 26 Freescale Semiconductor...
Page 40: ...Chapter 2 Pins and Connections MC9S08LG32 MCU Series Rev 5 40 Freescale Semiconductor...
Page 372: ......