Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Sudhir kunder

#1
LPC9xx/LPC9xxx / RTC configuration for P89LPC922
June 06, 2007, 12:29:03 AM
Hello sir,

I'm using P89LPC922FN for one of my project. In this I'm using RTC function.
I have used external clock source for RTC. The hardware connection is as
mentioned below
a) 32KHZ crystal at Port pin no 6 & 7
b) 15M resistor across Port pin no 6 & 7
c) 330K resistor across crystal pin and Port pin no 7
d) 22PF capacitor across each crystal pin and ground.

In Program following configuration and routine has been written

Declaration:
//***********************************************************
#define   rtc_low     0xff
#define   rtc_high  0x00//32KHz clk is used as a rtc clk
#define   rtc_con1  0x42//intrpt in 1 seconds
#define   rtc_con2  0x43//low freq clk select & rtc enable
//***********************************************************
Initialization:
//***********************************************************
RTCCON   = rtc_con1;
EWDRT   = 1;
RSTSRC   = 0X00;
RTCL   = rtc_low;
RTCH   = rtc_high;
WDCON   = 0Xe0;
RTCCON   = rtc_con2;
//***********************************************************
Interrupt:
//*********************************************************************
void rtc (void) interrupt 10//RTC interrupt arrives after every one sec
{
RSTSRC   = 0X00;
RTCCON   = rtc_con2;
RTCL   = rtc_low;
RTCH   = rtc_high;
****** Rest is the normal routine as per our process requirement ********

}
//*********************************************************************
Presently when I switch on my unit some times  RTC interrupt doesn't
come in time of one second and in this condition when I touch the 32KHZ crystal, controller starts Please guide me whether  hardware connection and
software configuration as mentioned above is proper. Is there any other method so that this problem can be solved.   

Please send some example program of RTC . Hope you will do the needful.

Thanks & Regards,
For Leela Electronics.
Sudhir Kunder.
#2
Hello,
  Please help me whether on Brown out reset DATA RAM content also reset.
i.e. If I have enabled the brown out detect and my controller(P89LPC922) reset once its supply voltage drops to 2.5V or below and later when supply is set to normal voltage i.e 3.2V then data memory contents will reset or it will remain same as it was before the brown out was detected.