Timers_Class

SetPWMFrequency()

Description

This method allows you to set PWM output frequency, keeping the duty cycle the same. Frequency is specified in Hertz. Mathematically speaking, it is the inverse of time period (ON time + OFF time).

Please keep in mind that changing the PWM frequency changes the timer behaviour and disrupts the normal operation of many functions such as delay(), millis()..

Syntax

timer.SetPWMFrequency(hz)

Parameters

timer: a variable of type Timers_Class .

hz: the new frequency value, type long int.

See also

Corrections, suggestions, and new documentation can be added directly to the wiki page. Scroll to the bottom, choose "Edit Page" and use "Papilio" as the password.

  

Share |