stepper_28BY_and_with_driver_and-pic18f4550


Delay time is required and stpper would not move when the pulses are too fast.
Each winding consume nearly 700mA and  Under half stepping it is about 1400mA.
I test with 7805 1A regulator.

//stepper test
void main()
     {
   OSCCON=0xff;   //osc configuration for max speed of internal
                             osc
     TRISA=0;
   
      for(;;)
             {
              // 8 steps for helf stepping
              // 4 steps for full stepping
             
              PORTA=0x0E; //1110
              delay_ms(5);
          //    PORTA=0x0C; //1100
          //     delay_ms(5);
              PORTA=0x0D; //1101
                 delay_ms(5);
           //   PORTA=0x09; //1001
           //   delay_ms(5);
              PORTA=0x0B; //1011
                 delay_ms(5);
          //    PORTA=0x03; //0011
          //    delay_ms(5);
              PORTA=0x07; //0111
                 delay_ms(5);
              PORTA=0x06; //0110 
             }
   
     }



Comments

Popular posts from this blog

Inductance caculator

Pointer to object array