#include<lpc21xx.h>
void delay();
int main()
{
int i;
IO1DIR=0X00FF0000; // pin nos 16 to 23(port 1) as chaser o/p
while(1)
{
IO1SET=0X00010000;
delay();
for(i=0;i<7;i++)
{
IO1SET=IO1SET<<1;
IO1CLR=IO1SET>>1;
delay();
}
}
}
void delay()
{
int i;
for(i=0;i<1000000;i++);
}
void delay();
int main()
{
int i;
IO1DIR=0X00FF0000; // pin nos 16 to 23(port 1) as chaser o/p
while(1)
{
IO1SET=0X00010000;
delay();
for(i=0;i<7;i++)
{
IO1SET=IO1SET<<1;
IO1CLR=IO1SET>>1;
delay();
}
}
}
void delay()
{
int i;
for(i=0;i<1000000;i++);
}
No comments:
Post a Comment