Led Glowing Using LPC2378
Led Glowing Using LPC2378
ALGORITHM: Initialize the header files. Assign the FIO3pin for LED. Assign the directory(FIO3DIR=0x008000FF;) to set the LED Set the delay condition for LED to glow The led glows, after the delay led clear. The condition gets repeated.
PROGRAM:
#include<nxp\iolpc2378.h> #include<stdio.h> void delay() { for(int i=0;i<=0xff;i++) for(int j=0;j<=0xff;j++); } void main() { //PINSEL0=0x00000000; //PINSEL3=0x00000000; FIO3DIR=0x008000FF; while(1) { FIO3SET=0x000000FF; delay(); FIO3CLR=0x000000FF;
delay(); }}
SNAPSHOT:
RESULT: Thus the led program is developed and result is viewed in LPC2378 Board.