fast pwm
Dependents: Quadrature_Test PID Flow measurement
Fork of FastPWM by
Diff: FastPWM.h
- Revision:
- 6:0f57969697b6
- Parent:
- 4:a7b9f778c4b4
- Child:
- 12:4600daab8a83
diff -r 2812f0a115f7 -r 0f57969697b6 FastPWM.h --- a/FastPWM.h Fri Feb 28 18:18:52 2014 +0000 +++ b/FastPWM.h Mon Mar 17 22:12:58 2014 +0000 @@ -22,9 +22,7 @@ /** Library that allows faster and/or higher resolution PWM output * - * Library can directly replace standard mbed PWM library. Only limitation is that the maximum PWM period is four times shorter - * The maximum achievable period is roughly 40 seconds, I dont think that should be a problem. - * Do take into account all PWM objects will run four times faster than default. + * Library can directly replace standard mbed PWM library. * * Contrary to the default mbed library, this library takes doubles instead of floats. The compiler will autocast if needed, * but do take into account it is done for a reason, your accuracy will otherwise be limitted by the floating point precision. @@ -40,22 +38,22 @@ FastPWM(PinName pin, int prescaler = -1); /** - * Set the PWM period, specified in seconds (double), keeping the duty cycle the same. + * Set the PWM period, specified in seconds (double), keeping the pulsewidth the same. */ void period(double seconds); /** - * Set the PWM period, specified in milli-seconds (int), keeping the duty cycle the same. + * Set the PWM period, specified in milli-seconds (int), keeping the pulsewidth the same. */ void period_ms(int ms); /** - * Set the PWM period, specified in micro-seconds (int), keeping the duty cycle the same. + * Set the PWM period, specified in micro-seconds (int), keeping the pulsewidth the same. */ void period_us(int us); /** - * Set the PWM period, specified in micro-seconds (double), keeping the duty cycle the same. + * Set the PWM period, specified in micro-seconds (double), keeping the pulsewidth the same. */ void period_us(double us);