Monday, 19 October 2015

PIC16F877A STEPPER MOTOR OPERATION



#include<pic.h>
#include<htc.h>
#define __PIC16F877A_H
__CONFIG(WDTE_OFF & FOSC_HS);
void delay(unsigned int i)
{
while(i--);
}
void main()
{
TRISD=0X00;
while(1)
{
PORTD=0x08;
delay(3000);
PORTD=0x04;
delay(3000);
PORTD=0x02;
delay(3000);
PORTD=0x01;
delay(3000);
}
}


No comments:

Post a Comment