PIC Development Board - Stepper Motor
int i=0;
void main()
{
TRISB=0X00;
PORTB=0X00;
while(1)
{
for(i=0;i<100;i++)
{
PORTB=0xEC;
Delay_ms(2);
PORTB=0xDC;
Delay_ms(2);
PORTB=0xBC;
Delay_ms(2);
PORTB=0x7C;
Delay_ms(2);
}
for(i=0;i<100;i++)
{
PORTB=0x7C;
Delay_ms(2);
PORTB=0xBC;
Delay_ms(2);
PORTB=0xDC;
Delay_ms(2);
PORTB=0xEC;
Delay_ms(2);
}
}
}