This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM7 Begineer

Hello All, I just started to lean the basics of ARM. I tried with the following program with LPC2148 and it works perfectly.

/*********************************************************
#include <LPC214x.H>
void delay(void);

int main(void)
{ IODIR0=0xFFFFFFFF;

while(1) {

IOSET0|=0xFFFFFFFF; delay(); IOCLR0=0xFFFFFFFF; delay(); delay();

}
}

void delay(void)
{ int z,c; c=0; for(z=0; z<4000000; z++) { c++; }
}

#include <LPC214x.H>
void delay(void);

int main(void)
{ IODIR0=0xFFFFFFFF;

while(1) {

IOSET0=0xFFFFFFFF; delay(); IOCLR0=0xFFFFFFFF; delay();

}
}

void delay(void)
{ int z,c; c=0; for(z=0; z<4000000; z++) { c++; }
}

/**********************************************

But I do have a problem with it. When I try to turn ON/OFF a single PIN for ex: P0.3 using the following statements, it never works. Please help me to get solved. What should I do more to make it work?

IODIR0|=(1<<3);

while(1) {

IOSET0|=(1<<3); delay(); IOCLR0|=(1<<3); delay();

}

Thanks

Parents Reply Children