#include <LPC213X.H>
#define LED1 1<<18
typedef unsigned int uint32;
void delay(uint32 dly)
{
uint32 i;
for(;dly>0;dly--)
for(i=0;i<50000;i++);
}
int main()
{
PINSEL2=PINSEL2&(~0x08);
IODIR1=LED1;
IODIR0=1<<0;
IOCLR0=1<<0;
while(1)
{
IOSET1=LED1;
delay(20);
IOCLR1=LED1;
delay(20);
}
} |