Embedded System Concepts
Wednesday, 25 December 2013
LED Blinking program in C for ARM (LPC 2xxx)
#include<lpc21xx.h>
void delay1 (unsigned int);
int main()
{
IO0DIR=(1<<0);
PINSEL0=0x00000000;
while(1)
{
IO0SET=(1<<0);
delay1(1000);
IO0CLR=(1<<0);
delay1(1000);
}
}
void delay1 (unsigned int x)
{
unsigned int i;
for (i=0;i<x; i++);
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment