Friday, 18 September 2015

Basic LED blinking in PIC

#include<pic.h>
void DELAY();
void main()
{
TRISB=0X00;
while(1)
{
PORTB=0XFF;
DELAY();
PORTB=0X00;

DELAY();
}
}
void DELAY()
{
int i,j;
for(i=0;i<100;i++)
for(j=0;j<100;j++);
}



No comments:

Post a Comment