CANNY 7.3 Echo. High Resolution PWM Driver

General Description

Any input-output channel of the controller supports operation in high-frequency pulse width modulation mode. Up to 2 independent HF PWM channels can be used simultaneously, each with individual period and duty cycle settings. During controller operation, HF PWM channels can be reassigned via the user function diagram. In HF PWM mode, the PWM timing parameters—period and duty cycle—are set in the range from 2 to 65535 microseconds, with a step of 1 microsecond.

Using the HF PWM driver allows the assigned controller channel to operate asynchronously to the function diagram, ensuring maximum stability of the generated signal’s timing parameters.

Note: HF PWM0 and HF PWM1 drivers are hard-linked to Channel 0 and Channel 1, respectively.

In HF PWM mode, the channel has a fixed pulse polarity — GND 100mA. Generation operates in open-collector mode (no internal pull-up; external pull-up required if needed).

Note: On the reverse side of the controller board, special solder pads are located. Shorting them (installing a jumper) enables a constant pull-up of the channel to the positive supply voltage (individually for each channel). By default, the controller’s pull-up resistors are mounted but disconnected.

The High-Frequency Pulse Width Modulator (HF PWM) driver utilizes resources from the input/output channel driver but operates with higher priority. Consequently, when the HF PWM driver is activated, the channels it uses become unavailable to the IO driver.

WARNING! In high-frequency pulse width modulation mode, the channel’s short-circuit electrical protection is disabled! Overloading or short-circuiting controller channels operating in HF PWM mode may cause permanent damage to the controller!

Driver Registers

Below is a description of the acceptable values for the registers controlling the High-Frequency Pulse Width Modulator driver.

HF PWM parameter configuration registers
Parameter Expected Values
HR PWMx Period Register, us 3…65535 = set the period in microseconds for the HF PWMx generator.
HR PWMx Duty Register, us 1…65535 = set the duty cycle for the HF PWMx channel in microseconds.

Note: The symbol «x» in the HF PWM register names can take values 0 or 1 and denotes the number of the high-frequency pulse width modulator driver it belongs to.

Operating Characteristics

Activation of the HF PWM driver is performed by setting a value other than 0 in the «HR PWMx Period Register, us».

Deactivation of the HF PWM driver is performed by setting the «HR PWMx Period Register, us» to 0. In this case, the HF PWM channel operation stops immediately, and control of the channel is returned to the IO Driver.

When the HF PWM driver is enabled, if the duty cycle value is set to 0, the PWM channel will always remain in its default state, i.e., floating («Float»), unless an external pull-up to the positive supply is connected, or at the supply voltage level if a pull-up is connected.

If the actual duty cycle value is greater than or equal to the actual period value, the PWM channel will remain permanently in the active low state («GND»).

When changing the period or duty cycle values of the HF PWM while the channel is operating in HF PWM mode, the new parameter values will be applied by the driver only at the beginning of the next HF PWM period. To apply new HF PWM parameters immediately, the PWM mode must be toggled off and then back on.

Functional diagram for smooth, cyclic LED brightness control connected to controller Channel 0.

SEE ALSO