pratheeshprm143
Newbie level 6
LPC 2138 pin toggling problem
hai
I have a development board of LPC2138 (from rhydolabz)
All the programs with the kit are perfectly working in it, but when I try to load my program for pin toggling it will not work.
Here is my program
#include<lpc21xx.h>
long int i;
int main(void)
{
PINSEL0=0X00000000;
PINSEL1=0X00000000;
IO0DIR=0XFFFFFFFF;
IO1DIR=0XFFFFFFFF;
while(1)
{
IO0SET=0XFFFFFFFF;
IO1SET=0XFFFFFFFF;
for(i=10000;i>0;i--)
{
IO0CLR=0XFFFFFFFF;
IO1CLR=0XFFFFFFFF;
}
for(i=10000;i>0;i--)
{
IO0SET=0XFFFFFFFF;
IO1SET=0XFFFFFFFF;
}
}
}
I am using flash magic to load the program.
I think it is the delay problem.
plz help me.................................
hai
I have a development board of LPC2138 (from rhydolabz)
All the programs with the kit are perfectly working in it, but when I try to load my program for pin toggling it will not work.
Here is my program
#include<lpc21xx.h>
long int i;
int main(void)
{
PINSEL0=0X00000000;
PINSEL1=0X00000000;
IO0DIR=0XFFFFFFFF;
IO1DIR=0XFFFFFFFF;
while(1)
{
IO0SET=0XFFFFFFFF;
IO1SET=0XFFFFFFFF;
for(i=10000;i>0;i--)
{
IO0CLR=0XFFFFFFFF;
IO1CLR=0XFFFFFFFF;
}
for(i=10000;i>0;i--)
{
IO0SET=0XFFFFFFFF;
IO1SET=0XFFFFFFFF;
}
}
}
I am using flash magic to load the program.
I think it is the delay problem.
plz help me.................................