swami.gangatharan
Junior Member level 3
- Joined
- Feb 15, 2012
- Messages
- 29
- Helped
- 1
- Reputation
- 2
- Reaction score
- 1
- Trophy points
- 1,283
- Location
- CHENNAI, INDIA
- Activity points
- 1,442
I build the Led blinking code for LPC 2148. in Evaluation mode i can simulate the code . i can load the code in to the CPU but not working .please any one help me..
Thanks in Advance...
Thanks in Advance...
Code:
#include <LPC214X.H>
void delay(void);
int main(void)
{
IO0DIR |= (1<<22);
while(1)
{
IO0SET |= (1<<22);
delay();
IO0CLR |= (1<<22); // Turn them off
delay(); // drive P0.30 High
}
return 0; // this wont execute ever :P
}
void delay(void)
{
int z,c;
c=0;
for(z=0; z<40000; z++) // You can edit this as per your needs
{
c++; // something needs to be here else KEIL compiler will remove the for loop!
}
}