Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/04/04 14:23
Read: times


 
#78690 - MCB900 and LPC932 WDT
Hi, I am trying to program the LPC932 with this WDT program, but it does not work. Program gets downloaded, but it does not run.
Enable WDT and Safety bit are disable under the device configurations options in Flash Magic. It works fine with the EPM900.
Thanks!


Initialize_the_Puppy();
{
P2 = 0;

for(;;)
{
unsigned char i;
state = 0x4499;
if ((state+= 0x1111) == 0x55AA) // 0x55AA
{
Feed_the_PUPPY ();
}
for (i = 0x01; i; i <<= 1)
{ P2 = i; // simulate running lights
delay (25000);
}
if ((state+= 0x1111) == 0x66BB)
{
Feed_the_PUPPY ();
}
for (i = 0x80; i; i >>= 1)
{ P2 = i;
delay (25000);
}
if ((state+= 0x2222) == 0x88DD)
{
Feed_the_PUPPY ();
}
state = 0;
}
}
}

void Initialize_the_Puppy(void)
{
WDL = 0xFF; // must be loaded before WDCON
EA = 0;
WDCON |= 0x05; //start WDT, and select WD oscillator
KICK_THE_PUPPY
EA = 1;
EWDRT = 1;
}

void Feed_the_PUPPY (void)
{
WDL = 0xFF;
EA = 0;
WDCON |= 0x05;
KICK_THE_PUPPY
EA = 1;

}

void watchdogrtc_isr(void) interrupt 10
{
wdt_c++;
if (WDCON &= ~0x06) {
P2 = 0;
}
else
{
RTCCON &= ~0x80; return;
}
}



List of 28 messages in thread
TopicAuthorDate
MCB900 and LPC932 WDT            01/01/70 00:00      
   RE: MCB900 and LPC932 WDT            01/01/70 00:00      
      RE: MCB900 and LPC932 WDT            01/01/70 00:00      
         RE: MCB900 and LPC932 WDT            01/01/70 00:00      
            RE: MCB900 and LPC932 WDT            01/01/70 00:00      
               RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                  RE: MCB900 and LPC932 WDT            01/01/70 00:00      
   RE: MCB900 and LPC932 WDT            01/01/70 00:00      
      RE: MCB900 and LPC932 WDT            01/01/70 00:00      
         RE: MCB900 and LPC932 WDT            01/01/70 00:00      
            RE: MCB900 and LPC932 WDT            01/01/70 00:00      
               RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                  RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                     RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                        RE: MCB900 and LPC932 WDT            01/01/70 00:00      
   RE: MCB900 and LPC932 WDT            01/01/70 00:00      
      RE: MCB900 and LPC932 WDT            01/01/70 00:00      
         RE: MCB900 and LPC932 WDT            01/01/70 00:00      
            RE: MCB900 and LPC932 WDT            01/01/70 00:00      
               RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                  RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                     RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                        RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                           RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                              RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                                 RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                                    RE: MCB900 and LPC932 WDT            01/01/70 00:00      
                        RE: MCB900 and LPC932 WDT            01/01/70 00:00      

Back to Subject List