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="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 (Release)
+
| 1.2
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| DSP
 
| DSP
 
|}
 
|}
  
  
 
+
==Output PWM component==
==[[File:Component Icon 649f4bc2_1360_4629_82aa_62e2fc32d4e4.png|Image]] 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.
  
==Examples==
+
==Detailed description==
''<span style="color:red;">No additional examples</span>''
 
  
 +
''No detailed description exists yet for this component''
  
==Downloadable macro reference==
+
==Examples==
  
===<span style="font-weight: normal;"><u><tt>OutputPWM</tt></u></span>===
 
Outputs a single value from the input buffer appropriatley scaled to suit the PWM.
 
  
'''Parameters'''
+
''<span style="color:red;">No additional examples</span>''
  
:''This macro has no parameters''
 
  
 +
==Downloadable macro reference==
  
'''Return value'''
+
{| 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.&nbsp;
 +
|-
 +
|-
 +
| 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''
 +
|}
  
:''This call does not return a value''
 
  
 +
{| 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | Delay
 +
|-
 +
| colspan="2" | Delay in microseconds between outputting each sample.&nbsp;
 +
|-
 +
| 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''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>OutputPWMArray</tt></u></span>===
 
Outputs an array of values from the input buffer appropriatley scaled to suit the PWM.
 
  
'''Parameters'''
+
{| 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | State
 +
|-
 +
| colspan="2" | 0=Disable, 1=Enable&nbsp;
 +
|-
 +
| 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''
 +
|}
  
:[[Variable Types|UINT]] ''Delay''
 
::Delay in microseconds between outputting each sample.
 
  
 +
{| 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.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | P
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | I
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | D
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| 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''
 +
|}
  
'''Return value'''
 
  
:''This call does not return a value''
 
 
 
===<span style="font-weight: normal;"><u><tt>ControlPWM</tt></u></span>===
 
Enable or disable the PWM output,
 
 
Disabled by default.
 
 
'''Parameters'''
 
 
:[[Variable Types|BOOL]] ''State''
 
::0=Disable, 1=Enable
 
 
 
'''Return value'''
 
 
:''This call does not return a value''
 
 
 
 
==Simulation macro reference==
 
 
''This component does not contain any simulation macros''
 
  
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Connect To</u></span>
 
  
This property is of type ''Panel object'' and can be referenced with the variable name ''ConnectTo''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
''<span style="color:red;">No additional information</span>''
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
 
+
|-
 
+
|-
<span style="font-weight: normal;"><u>Channel</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
+
| width="90%" | Connect To
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_pwm1::CHANNEL''.
+
|-
 
+
| colspan="2" | &nbsp;
PWM Channel selector
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Alt Pin Enable</u></span>
+
| width="90%" | Channel
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_pwm1::HWALT''.
+
| colspan="2" | PWM Channel selector&nbsp;
 
+
|-
Alternative Pin Enable (if available on target device)
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Alt Pin Enable
<span style="font-weight: normal;"><u>Port</u></span>
+
|-
 
+
| colspan="2" | Alternative Pin Enable (if available on target device)&nbsp;
This property is of type ''Single digital pin'' and can be referenced with the variable name ''cal_pwm1::PORT''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
''<span style="color:red;">No additional information</span>''
+
| width="90%" | Port
 
+
|-
 
+
| colspan="2" | &nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Period Register</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Period Register
This property is of type ''Signed integer'' and can be referenced with the variable name ''cal_pwm1::PERIOD''.
+
|-
 
+
| colspan="2" | PWM Period Register value&nbsp;
PWM Period Register value
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
<span style="font-weight: normal;"><u>Prescaler Divide</u></span>
+
| width="90%" | Prescaler Divide
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_pwm1::PRESCALE''.
+
| colspan="2" | Prescaler Divider value&nbsp;
 
+
|-
Prescaler Divider value
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | PWM Timer
<span style="font-weight: normal;"><u>PWM Timer</u></span>
+
|-
 
+
| 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.&nbsp;
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''cal_pwm1::timer''.
+
|-
 
+
| 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" | &nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Period (uS)</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
+
| width="90%" | Frequency (KHz)
This property is of type ''Floating point'' and can be referenced with the variable name ''cal_pwm1::CALC_PERIOD''.
+
|-
 
+
| colspan="2" | &nbsp;
''<span style="color:red;">No additional information</span>''
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
 
+
|-
<span style="font-weight: normal;"><u>Frequency (KHz)</u></span>
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
This property is of type ''Floating point'' and can be referenced with the variable name ''cal_pwm1::CALC_FREQ''.
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''
 
+
|-
''<span style="color:red;">No additional information</span>''
+
|}

Revision as of 18:58, 16 November 2021

Author Matrix Ltd
Version 1.2
Category DSP


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

Fc9-comp-macro.png OutputPWM
Outputs a single value from the input buffer appropriatley scaled to suit the PWM. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png OutputPWMArray
Outputs an array of values from the input buffer appropriatley scaled to suit the PWM. 
Fc9-u16-icon.png - UINT Delay
Delay in microseconds between outputting each sample. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ControlPWM
Enable or disable the PWM output, Disabled by default. 
[[File:]] - State
0=Disable, 1=Enable 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ChangePID
Allows the P, I and D control parameters to be changed on the fly during a program. 
[[File:]] - P
 
[[File:]] - I
 
[[File:]] - D
 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-17-icon.png Connect To
 
Fc9-type-16-icon.png Channel
PWM Channel selector 
Fc9-type-16-icon.png Alt Pin Enable
Alternative Pin Enable (if available on target device) 
Fc9-type-5-icon.png Port
 
Fc9-type-14-icon.png Period Register
PWM Period Register value 
Fc9-type-16-icon.png Prescaler Divide
Prescaler Divider value 
Fc9-type-16-icon.png PWM Timer
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. 
Fc9-type-15-icon.png Period (uS)
 
Fc9-type-15-icon.png Frequency (KHz)
 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations