Author Topic: LPC932A1 cannot work  (Read 41115 times)

ericinsomewhere

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
LPC932A1 cannot work
« on: January 11, 2005, 12:21:46 am »
I build a simple program of LPC932A1 to toggle P0 and P1. It work fine on RIDE and Keil. After download to real device using Flash Magic, nothing happen. Anybody can help?

Is it need to set any starting address?

The code is attached here:

#include

//UCFG1 = 0x43
//   .7 WDTE (Watchdog Timer Reset Enable)
//   .6 RPE   (Reset Pin Enable)
//   .5 BOE   (Brownout Detect Enable)
//   .4 WDSE   (Watchdog Safety Enable)
//   .3 reserved
//   .2/1/0   FOSC (011: Internal RC OSC 7.373 +/-2.5%)

void InitIO(void)
{
   P0M2 = 0xFF;      //All P0 is Push-pull output
   P0M1 = 0x00;

   P1M2 = 0xFF;      //All P1 is Push-pull output
   P1M1 = 0x00;
}

void main(void)
{
   InitIO();
   while(1){
      P0 = 0xFF;
      P0 = 0x00;
      P1 = 0xFF;
      P1 = 0x00;      
   }
}

erikm

  • Guest
Re: LPC932A1 cannot work
« Reply #1 on: January 11, 2005, 04:19:18 am »
1) do not believe that a SIMULATOR will tell the truth
2) a SIMULATOR will disregard the configuration of the port pins
3) a SIMULATOR does not check how the LEDs are connected
4) a SIMULATOR does not take into account that your program will show the LEDs lit, not blinking
5) a SIMULATOR simulates.

Erik