I’m trying to drive a motor with a drv8801 controlled via a wixel. I can make the motor go forward and stop, but not go backwards.
I have connected wixel P0_0 —> 8801 DIR (aka PHASE), and wixel P0_1 —> 8801 PWM (aka ENABLE).
The wixel is powered via USB at present, the 8801 logic power is coming from the wixel 3.3 output and GND pins, and the motor with a 9v battery via the 8801 VMM and GND pins.
My init code:
setPort0PullType(LOW); setDigitalOutput(P0_0, HIGH); // DIR defaults to forwards setDigitalOutput(P0_1, LOW); // PWM 0%
My code for stop/forward/rev:
case RFC_STOP: setDigitalOutput(P0_1, LOW); // PWM 0% break; case RFC_FWD: setDigitalOutput(P0_0, HIGH); // Forward setDigitalOutput(P0_1, HIGH); // PWM 100% break; case RFC_REV: setDigitalOutput(P0_0, LOW); // Backwards setDigitalOutput(P0_1, HIGH); // PWM 100% break;
Is the problem something to do with not getting the DIR pin properly low? That is what the line in the init code which sets P0 to pulldown was trying to ensure.
Any help appreciated,