/* ** ################################################################### ** ** This file was created by Processor Expert 02.86 for ** the Freescale series of microcontrollers. ** ** Project : RTCdemo ** ** Processor : LJ12 ** ** Filename : RTCdemo.C ** ** Date/Time : 07/04/2002, 12:18 ** ** Abstract : ** ** Main module. ** Here is to be placed user's code. ** ** Settings : ** ** ** Contents : ** ** Copyright: 1997 - 2009 Freescale Semiconductor, Inc. All Rights Reserved. ** ** ** ** http : www.freescale.com ** mail : support@freescale.com ** ** ################################################################### */ /* MODULE RTCdemo */ /*******************************************************************************************/ /* TIMEDATE driver test */ /* Conditional translation is to be set via "cond.h" !!! */ /* File "cond.h" also contains additional information. Especially, PE settings for each */ /* tested variant. */ /*******************************************************************************************/ /*Including used modules for compilling procedure*/ #include "Cpu.h" #include "Events.h" #include "RT.h" /*Include shared modules, which are used for whole project*/ #include "PE_Types.h" #include "PE_Error.h" #include "PE_Const.h" #include "IO_Map.h" void main(void) { DATEREC Datum; TIMEREC Cas; byte er; DAYOFWEEK Den; /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ PE_low_level_init(); /*** End of Processor Expert internal initialization. ***/ er=RT_SetDate(2002,4,6); //set new date er=RT_SetTime(12,29,58); //set new time er=RT_SetAlarm(12,31); //set alarm alarm = " "; for (;*alarm==' ';); //wait for alarm er=RT_GetTime(&Cas); //read time er=RT_GetDate(&Datum); //read date er=RT_GetDayOfWeek(&Den); //read day of week /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/ for(;;){} /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/ } /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/ /* END RTCdemo */ /* ** ################################################################### ** ** This file was created by Processor Expert 02.86 for ** the Freescale HC08 series of microcontrollers. ** ** ################################################################### */