This documentation is out of date.
The new version of the documentation is here: https://cannylogic.com/docs |
Difference between revisions of "CANNY 7, HR PWM Driver"
[unchecked revision] | [unchecked revision] |
m (Support moved page HR PWM Driver to CANNY 7, HR PWM Driver without leaving a redirect) |
(→Drivers Registers) |
||
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | === | + | === General description === |
− | + | CANNY 7 supports high-resolution pulse-width modulator mode for two of twelve IO channels (Channels #1 and #2). This channels may be activated independently of each other and have independent duty cycle and pull-up line configuration. However, the high resolution PWM period is a parameter common to both channels. In HR PWM mode, PWM timing - the period and duty cycle are set in the range from 2 to 20,000 microseconds, in increments of 1 microsecond. | |
− | + | In HR PWM, the channel has a fixed pulse polarity - GND 100mA. Generation can be conducted in either open collector (no pull-up lines or external pull-up) or with internal pull-up to +12V (specified by setting the value in the appropriate register). In this mode, the channel is asynchronous to functional diagram, which allows maximum timing stability of generated signal. | |
− | + | ||
+ | |||
+ | The driver of high resolution pulse width modulator (HR PWM) operates using [[CANNY 7, Discrete IO Driver | Discrete Inputs and Outputs]] resources, wherein, having a higher priority. Thus, upon activation of the HR PWM driver, controller channels used are unavailable to input-output drivers. | ||
{| | {| | ||
− | |valign="top" style="padding-left:0.5em;"|'' | + | |valign="top" style="padding-left:0.5em;"|''Note:'' |
− | |valign="top" style="padding-left:0.5em;"|'' | + | |valign="top" style="padding-left:0.5em;"|''In high resolution pulse width modulator mode, the electrical protection from short circuit is disabled! Overload or channel short-circuit in high resolution PWM mode can lead to controller failure!'' |
|} | |} | ||
− | === | + | === Drivers Registers === |
− | + | The following shows permissible values for control registers of high resolution PWM driver. | |
{|border="1" style="border-collapse:collapse;" align="left" width="100%" | {|border="1" style="border-collapse:collapse;" align="left" width="100%" | ||
|- align="center" valign="top" | |- align="center" valign="top" | ||
− | !width="250px"| | + | !width="250px"|Address |
− | ! | + | !Expected Values |
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM 1 & 2 Period Register, μs |
|valign="top"| | |valign="top"| | ||
{|border="0" align="left" | {|border="0" align="left" | ||
Line 27: | Line 29: | ||
|width="70px" style="padding-left:0.5em;"|1...20000 | |width="70px" style="padding-left:0.5em;"|1...20000 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|specify the period in microseconds RR PWM generator for both channels. The value in excess of 20,000 will be accepted as 20,000. |
|} | |} | ||
|- valign="top" | |- valign="top" | ||
Line 33: | Line 35: | ||
{|border="0" align="left" | {|border="0" align="left" | ||
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM 1 Enable Register |
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM 2 Enable Register |
|} | |} | ||
| | | | ||
Line 42: | Line 44: | ||
|width="70px" style="padding-left:0.5em;"|1...65535 | |width="70px" style="padding-left:0.5em;"|1...65535 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|transfer controller channel in to high resolution pulse width modulator mode; |
|- valign="top" | |- valign="top" | ||
|width="70px" style="padding-left:0.5em;"|0 | |width="70px" style="padding-left:0.5em;"|0 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"| return controller channel to normal mode. |
|} | |} | ||
|- valign="top" | |- valign="top" | ||
Line 52: | Line 54: | ||
{|border="0" align="left" | {|border="0" align="left" | ||
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM 1 Duty Register, μs |
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM 2 Duty Register, μs |
|} | |} | ||
| | | | ||
Line 61: | Line 63: | ||
|width="70px" style="padding-left:0.5em;"|1...20000 | |width="70px" style="padding-left:0.5em;"|1...20000 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|set HR PWM channel filling (duty cycle) in microseconds. The value in excess of 20,000 will be accepted as 20,000. |
|} | |} | ||
|- valign="top" | |- valign="top" | ||
Line 67: | Line 69: | ||
{|border="0" align="left" | {|border="0" align="left" | ||
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM 1 Pull-up Enable Register |
|- valign="top" | |- valign="top" | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM 2 Pull-up Enable Register |
|} | |} | ||
| | | | ||
Line 76: | Line 78: | ||
|width="70px" style="padding-left:0.5em;"|1...65535 | |width="70px" style="padding-left:0.5em;"|1...65535 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM generation polarity for the channel [[«MINUS 100mA»]] / [[«positive pull-up»]]; |
|- valign="top" | |- valign="top" | ||
|width="70px" style="padding-left:0.5em;"|0 | |width="70px" style="padding-left:0.5em;"|0 | ||
|style="padding-left:0.5em;"|= | |style="padding-left:0.5em;"|= | ||
− | |style="padding-left:0.5em;"| | + | |style="padding-left:0.5em;"|HR PWM generation polarity for the channel [[«MINUS 100mA»]] / [[«air»]] (open collector mode). |
|} | |} | ||
|} | |} | ||
− | + | An example of a functional diagram - continuously adjustable HR PWM duty cycle with carrier frequency 10 kHz on channel #1, by pressing / holding the buttons connected to the channels #9 and #10: | |
[[File:6_7_2_1.png|center]] | [[File:6_7_2_1.png|center]] | ||
− | == | + | == See also == |
[[CANNY 7]] | [[CANNY 7]] | ||
− | [[Discrete IO Driver | + | [[CANNY 7, Discrete IO Driver]] |
Latest revision as of 08:49, 29 November 2016
General description
CANNY 7 supports high-resolution pulse-width modulator mode for two of twelve IO channels (Channels #1 and #2). This channels may be activated independently of each other and have independent duty cycle and pull-up line configuration. However, the high resolution PWM period is a parameter common to both channels. In HR PWM mode, PWM timing - the period and duty cycle are set in the range from 2 to 20,000 microseconds, in increments of 1 microsecond.
In HR PWM, the channel has a fixed pulse polarity - GND 100mA. Generation can be conducted in either open collector (no pull-up lines or external pull-up) or with internal pull-up to +12V (specified by setting the value in the appropriate register). In this mode, the channel is asynchronous to functional diagram, which allows maximum timing stability of generated signal.
The driver of high resolution pulse width modulator (HR PWM) operates using Discrete Inputs and Outputs resources, wherein, having a higher priority. Thus, upon activation of the HR PWM driver, controller channels used are unavailable to input-output drivers.
Note: | In high resolution pulse width modulator mode, the electrical protection from short circuit is disabled! Overload or channel short-circuit in high resolution PWM mode can lead to controller failure! |
Drivers Registers
The following shows permissible values for control registers of high resolution PWM driver.
Address | Expected Values | ||||||||
---|---|---|---|---|---|---|---|---|---|
HR PWM 1 & 2 Period Register, μs |
| ||||||||
|
| ||||||||
|
| ||||||||
|
|
An example of a functional diagram - continuously adjustable HR PWM duty cycle with carrier frequency 10 kHz on channel #1, by pressing / holding the buttons connected to the channels #9 and #10: