![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
CCW CW Control BLDC
Diff: kukei.h
- Revision:
- 0:faa58403944a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/kukei.h Sun Feb 17 02:58:08 2019 +0000 @@ -0,0 +1,111 @@ + + +/********* 矩形反 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); +} + +/**********************************************/ \ No newline at end of file