Notes : Interrupt service routine for RTC module.

**********************************************************************/

#pragma TRAP_PROC void RTC_ISR(void)

{

/* Clear the interrupt flag */ 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;

}

MCF51QE128 MCU Series Reference Manual, Rev. 3

290

Freescale Semiconductor

Get the latest version from freescale.com

Page 290
Image 290
Freescale Semiconductor MCF51QE128RM manual Freescale Semiconductor