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.

Blinking led with LPC2138

Status
Not open for further replies.

vead

Full Member level 5
Joined
Nov 27, 2011
Messages
285
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
india
Activity points
3,815
Hello

I want to blink led with LPC2138 on proteus simulator. I have written program on keil but I am not to see led blink

This is my code
Code:
#include <LPC213X.H>

void delay(unsigned int wait);

void delay(unsigned int wait)
{
    unsigned i;
    for( i = 0; i < wait; i++)  
    {  
		   }
}

int main (void)
{
	    IODIR0 = 0x000000FF;         //Port-0.0 to Port-0.7 pins as Output Pin
	
	while (1)
		
	 {
		     IOSET0 = 0x000000FF;             //P0.0 to P0.7 are high
	     
		   delay(5000);
	      
		   IOCLR0 = 0x000000FF;            //P0.0 to P0.7 are low
	  
     		 delay(2000);
	 }
	 
 }

What is problem
 

Attachments

  • LPC design.jpg
    LPC design.jpg
    70.2 KB · Views: 187

I'm not familiar with this chip or proteus, but don't you need an oscillator or crystal or something? Also, if you've got a nominal clock of, say, 10MHz, your blink rate is going to be extremely fast (700uS)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top