Saturday, 19 September 2015

Chaser in PIC16F877A

#include<pic.h>
void DELAY();
void main()
{
int i;
TRISB=0X00;
TRISC=0XFF;
while(1)
{
PORTB=0X01;
DELAY();
for(i=0;i<7;i++)
{
PORTB=PORTB<<1;
DELAY();
}
}
}
void DELAY()
{
int i,j;
for(i=0;i<100;i++)
for(j=0;j<100;j++);
}

No comments:

Post a Comment