Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Lpc2148 led blink not working.

Status
Not open for further replies.

swami.gangatharan

Junior Member level 3
Junior Member level 3
Joined
Feb 15, 2012
Messages
29
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
CHENNAI, INDIA
Visit site
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...
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!
    }
}
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top