Default mbed pwm doesn't have enough resolution at high frequencies, thats why I implemented VNH5019 Motor carrier with FastPWM.
Fork of VNH5019 by
Diff: VNH5019.h
- Revision:
- 2:d670a4b999ab
- Parent:
- 1:5e8d9ed18f0f
- Child:
- 5:b5f360a16354
--- a/VNH5019.h Sat Feb 01 14:46:45 2014 +0000 +++ b/VNH5019.h Sat Feb 01 14:56:54 2014 +0000 @@ -32,9 +32,13 @@ // enable the motor. void enable(); + + // set the PWM period of oscillation in seconds + void set_pwm_period(float p) + { PWM.period(p); } private: - void init(); // Initialize TIMER 1, set the PWM to 20kHZ. + void init(); DigitalOut INA; DigitalOut INB;