umesh patil

RTC timer Initialization ..

Discussion created by umesh patil on Sep 6, 2011
Latest reply on Sep 23, 2011 by umesh patil

 hi  i am used mc9so8dz60 demo board .. i initialize RTC  timer .. but it is not working so please help me to int RTC timer..here is my code 

void timerint(void);

void main(void)

 {

EnableInterrupts;

timerint();

SOPT1=0x00;

SOPT2=0x00;
      for(; :smileywink: 

 { 

        PTFD_PTFD3=0; 

 PTFDD_PTFDD3=1; 

 Lcd16x2Init(); 

 Cpu_Delay100US(1000);   

 DispMsg(msg,16,0x080); 

 Cpu_Delay100US(1000); 

 }

  for(; :smileywink:

{ } /* loop forever */  /* please make sure that you never leave main */

}

 

 

 

 

void timerint(void)

{

RTCMOD=0;

RTCSC_RTCPS =15;

RTCSC_RTCLKS=0;

}

#pragma TRAP_PROCvoid RTC_ISR(void)

{  

RTCSC=RTCSC|0x80;  

PTCD_PTCD5=0;     // led on

 PTCDD_PTCDD5=1;  

Cpu_Delay100US(100);  

PTCD_PTCD5=1;  // led off

PTCDD_PTCDD5=1;

 Cpu_Delay100US(100);

}

Outcomes