#include<pic.h>
#include<htc.h>
#define __PIC16F877A_H
__CONFIG(WDTE_OFF & FOSC_HS);
void delay(unsigned int i)
{
while(i--);
}
void main()
{
TRISDbits.TRISD0=0;
TRISD=0X00; //for making output port
int i;
while(1)
{
for(i=0;i<=7;i++)
{
PORTD=0X80>>i;
delay(20000);
}
}
}
No comments:
Post a Comment