CCW CW Control BLDC

Dependencies:   mbed mbed-rtos

kukei.h

Committer:
oguro
Date:
2019-02-17
Revision:
0:faa58403944a

File content as of revision 0:faa58403944a:



/********* 矩形反 Drive *******************/
void PWM_U(){       
   PWM_IN1_U.write(STOP*power);  
   PWM_IN2_V.write(0);
   PWM_IN3_W.write(0); 
   ut1=uT.read_us();
}
void EN_U(){
   PWM_IN1_U.write(STOP*power);  
   PWM_IN2_V.write(0);
   PWM_IN3_W.write(0);       
}
void PWM_V(){      
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(STOP*power);
    PWM_IN3_W.write(0);  
}
void EN_V(){
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(STOP*power);
    PWM_IN3_W.write(0);          
}
void PWM_W(){     
     PWM_IN1_U.write(0);  
     PWM_IN2_V.write(0);
     PWM_IN3_W.write(STOP*power);  
}
void EN_W(){        
     PWM_IN1_U.write(0);  
     PWM_IN2_V.write(0);
     PWM_IN3_W.write(STOP*power);
}
/*******************************************/
/*********Forward 起動 FNC*******************/
void start_F5(){  
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(kido);  //kido
     wait_ms(START);
    }
 void start_F4(){  
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(kido);
       wait_ms(START);
    }
void start_F6(){      
    PWM_IN1_U.write(kido);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(0);   
     wait_ms(START);
 }
void start_F2(){    
    PWM_IN1_U.write(kido);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(0); 
      wait_ms(START); 
}
void start_F3(){ 
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(kido);
    PWM_IN3_W.write(0);    
     wait_ms(START);
}
void start_F1(){ 
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(kido);
    PWM_IN3_W.write(0); 
       wait_ms(START);
}    
/*********Reversal 起動 FNC*******************/
void start_R5(){ 
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(kido);  
    wait_ms(START);
}
void start_R1(){  
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(kido); 
      wait_ms(START);  
}
void start_R3(){ 
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(kido);
    PWM_IN3_W.write(0); 
    wait_ms(START);
}
void start_R2(){     
    PWM_IN1_U.write(0);  
    PWM_IN2_V.write(kido);
    PWM_IN3_W.write(0);       
      wait_ms(START);
}
void start_R6(){
    PWM_IN1_U.write(kido);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(0); 
    wait_ms(START);
}
void start_R4(){  
    PWM_IN1_U.write(kido);  
    PWM_IN2_V.write(0);
    PWM_IN3_W.write(0); 
      wait_ms(START);
}

/**********************************************/