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;
}
}