Problem in LPC2138 development board

Status
Not open for further replies.

kodi.sudar

Member level 5
Joined
Dec 21, 2009
Messages
92
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
india
Visit site
Activity points
1,849
Hi
I have bought the ARM7 LPC2138 / LPC2148 Development Board from robokits.co.in ,
**broken link removed**

The board is not responding to my code which i have developed in keil c. The code works well in proteus simulation,
here is my code
Code:
#include <LPC214X.H>


void wait(void)
{
	long d;
	for(d=0;d<10000;d++);
}

int main(main)
{
	unsigned int i;
	IODIR1 	= 0X00FF0000;
	while (1)
		{
			for(i=1<<16;i<1<<23;i<<=1)
				{
					IOSET1 = i;
					wait ();
					IOCLR1 = i;
				}
			for(i=1<<23;i>1<<16;i>>=1)
				{
					IOSET1 = i;
					wait();
					IOCLR1 = i;
				}
		}
}

another code

Code:
#include <LPC213X.H>
void delay(void);
int main(void)
	{
		
		IODIR1 = 0X00FF0000;
		
		while(1)
			{
					IOSET1 = 0X00FF0000;
					delay();
					
					IOCLR1 = 0X00FF0000;
					delay();
					delay();
					delay();
			}
		
	}
void delay(void)
	{	
		long int i,j,c;
		for(i=0;i<400;i++)
		{
			for(j=0;j<1000;j++)
				{
						c++;
				}
		}	
	}

crystal oscillator frequency is 12 MHZ

Please help me to begin with the hardware

Thanks in advance
 
Last edited:

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…