Difference between revisions of "Component: Output PWM (DSP)"
From Flowcode Help
Jump to navigationJump to search (XML import) |
|||
Line 1: | Line 1: | ||
− | + | {| style="width:50%" | |
− | |||
− | {| | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Author | + | | width="20%" style="color:gray;" | Author |
| Matrix Ltd | | Matrix Ltd | ||
|- | |- | ||
− | | width="20%" style="color: gray;" | Version | + | | width="20%" style="color:gray;" | Version |
− | | 1.2 | + | | 1.2 |
|- | |- | ||
− | | width="20%" style="color: gray;" | Category | + | | width="20%" style="color:gray;" | Category |
| DSP | | DSP | ||
|} | |} | ||
− | + | ==Output PWM component== | |
− | == | ||
Allows the values from a buffer to be passed directly to an internal PWM output. | Allows the values from a buffer to be passed directly to an internal PWM output. | ||
− | == | + | ==Detailed description== |
− | |||
+ | ''No detailed description exists yet for this component'' | ||
− | == | + | ==Examples== |
− | |||
− | |||
− | '' | + | ''<span style="color:red;">No additional examples</span>'' |
− | |||
+ | ==Downloadable macro reference== | ||
− | ''' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OutputPWM''' | ||
+ | |- | ||
+ | | colspan="2" | Outputs a single value from the input buffer appropriatley scaled to suit the PWM. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''OutputPWMArray''' | ||
+ | |- | ||
+ | | colspan="2" | Outputs an array of values from the input buffer appropriatley scaled to suit the PWM. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | Delay | ||
+ | |- | ||
+ | | colspan="2" | Delay in microseconds between outputting each sample. | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | ''' | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlPWM''' | ||
+ | |- | ||
+ | | colspan="2" | Enable or disable the PWM output, Disabled by default. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | State | ||
+ | |- | ||
+ | | colspan="2" | 0=Disable, 1=Enable | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
+ | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
+ | |- | ||
+ | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
+ | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ChangePID''' | ||
+ | |- | ||
+ | | colspan="2" | Allows the P, I and D control parameters to be changed on the fly during a program. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | P | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | I | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:]] - | ||
+ | | width="90%" | D | ||
+ | |- | ||
+ | | colspan="2" | | ||
+ | |- | ||
+ | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
+ | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
+ | |} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Property reference== | ==Property reference== | ||
− | |||
− | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-17-icon.png]] | |
− | + | | width="90%" | Connect To | |
− | + | |- | |
− | + | | colspan="2" | | |
− | PWM Channel selector | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Channel | |
− | + | |- | |
− | + | | colspan="2" | PWM Channel selector | |
− | + | |- | |
− | Alternative Pin Enable (if available on target device) | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
− | + | | width="90%" | Alt Pin Enable | |
− | + | |- | |
− | + | | colspan="2" | Alternative Pin Enable (if available on target device) | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-5-icon.png]] | |
− | + | | width="90%" | Port | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-14-icon.png]] | |
− | + | | width="90%" | Period Register | |
− | + | |- | |
− | + | | colspan="2" | PWM Period Register value | |
− | PWM Period Register value | + | |- |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | width="90%" | Prescaler Divide | |
− | + | |- | |
− | + | | colspan="2" | Prescaler Divider value | |
− | + | |- | |
− | Prescaler Divider value | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] |
− | + | | width="90%" | PWM Timer | |
− | + | |- | |
− | + | | colspan="2" | Timer associated with PWM to drive the output. Warning - All PWM channels linked to the same timer will share the same period and prescaler settings. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | Timer associated with PWM to drive the output. | + | | width="90%" | Period (uS) |
− | + | |- | |
− | Warning - All PWM channels linked to the same timer will share the same period and prescaler settings. | + | | colspan="2" | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-15-icon.png]] | |
− | + | | width="90%" | Frequency (KHz) | |
− | + | |- | |
− | + | | colspan="2" | | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections''' | |
− | + | |- | |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations''' | |
− | + | |- | |
− | + | |} |
Revision as of 18:58, 16 November 2021
Author | Matrix Ltd |
Version | 1.2 |
Category | DSP |
Contents
Output PWM component
Allows the values from a buffer to be passed directly to an internal PWM output.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
![]() |
OutputPWM |
Outputs a single value from the input buffer appropriatley scaled to suit the PWM. | |
![]() |
Return |
![]() |
OutputPWMArray |
Outputs an array of values from the input buffer appropriatley scaled to suit the PWM. | |
![]() |
Delay |
Delay in microseconds between outputting each sample. | |
![]() |
Return |
![]() |
ControlPWM |
Enable or disable the PWM output, Disabled by default. | |
[[File:]] - | State |
0=Disable, 1=Enable | |
![]() |
Return |
![]() |
ChangePID |
Allows the P, I and D control parameters to be changed on the fly during a program. | |
[[File:]] - | P |
[[File:]] - | I |
[[File:]] - | D |
![]() |
Return |