Difference between revisions of "Component: DAC (Internal) (Analog Output)"

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 TSL
 
| Matrix TSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 2.0 (Release)
+
| 2.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Analog Output
 
| Analog Output
 
|}
 
|}
  
  
 +
==DAC (Internal) component==
 +
Provides access to the onboard digital to analog converter (DAC) peripheral allowing for simple analogue output. Often the DAC output will be very low current and will need amplification using external circuitry to drive anything useful.
  
==[[File:Component Icon 09222494_fbef_455b_9651_9e9e46592eb5.png|Image]] DAC (Internal) component==
+
==Detailed description==
Provides access to the onboard digital to analog converter (DAC) peripheral allowing for simple analogue output.
+
 
Often the DAC output will be very low current and will need amplification using external circuitry to drive anything useful.
+
''No detailed description exists yet for this component''
  
 
==Examples==
 
==Examples==
 +
 +
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
  
Line 24: Line 27:
 
==Downloadable macro reference==
 
==Downloadable macro reference==
  
===<span style="font-weight: normal;"><u><tt>SetOutput</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Sets the output voltage of the DAC
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetOutput'''
 +
|-
 +
| colspan="2" | Sets the output voltage of the DAC&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | DAC_Value
 +
|-
 +
| colspan="2" | The value to output to the DAC&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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|UINT]] ''DAC_Value''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::The value to output to the DAC
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetValue'''
 +
|-
 +
| colspan="2" | Gets the Name property value&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Name
 +
|-
 +
| colspan="2" | The name of the property&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
  
'''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;" | '''Disable'''
 +
|-
 +
| colspan="2" | Disables the DAC output.&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;" | '''Enable'''
 +
|-
 +
| colspan="2" | Enables the DAC Output.&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>Disable</tt></u></span>===
 
Disables the DAC output.
 
  
'''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;" | '''SetValue'''
 +
|-
 +
| colspan="2" | Sets the Value for the named property&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Name
 +
|-
 +
| colspan="2" | Name of property to update&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Value
 +
|-
 +
| colspan="2" | The new value for the property&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 macro has no 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;" | '''GetList'''
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Name
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
'''Return value'''
 
  
:''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;" | '''SetPivotPos'''
 +
|-
 +
| colspan="2" | Sets the position of the object the lever rotates around &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | PositionHandle
 +
|-
 +
| colspan="2" | A handle to the position of the depressed location&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>Enable</tt></u></span>===
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Enables the DAC Output.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetAutoReset'''
 +
|-
 +
| colspan="2" | Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop &nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | State
 +
|-
 +
| colspan="2" | Set true to reset to off on sim stop, else false to retain state&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''
 +
|}
  
'''Parameters'''
 
  
:''This macro has no 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;" | '''SetLatching'''
 +
|-
 +
| colspan="2" | Sets whether the button is depressed when the mouse is released&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Enabled
 +
|-
 +
| 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'''
+
{| 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;" | '''Unregister'''
 +
|-
 +
| colspan="2" | Removes the object to the list if present&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Target
 +
|-
 +
| 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''
 +
|}
  
:''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;" | '''SetMovementFor'''
 +
|-
 +
| colspan="2" | Sets the movement in units or PI/16 steps for the button&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Target
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:]] -
 +
| width="90%" | Move
 +
|-
 +
| colspan="2" | Movement to set to, default 4&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''
 +
|}
  
  
==Simulation 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;" | '''GetList'''
 +
|-
 +
| colspan="2" | Gets Named property List&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" | Name
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
===<span style="font-weight: normal;"><u><tt>GetValue</tt></u></span>===
 
Gets the Name property value
 
  
'''Parameters'''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
:[[Variable Types|STRING]] ''Name''
+
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
::The name of the property
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetList'''
 
+
|-
 
+
| colspan="2" | returns Named property list&nbsp;
'''Return value'''
+
|-
 
+
|-
:[[Variable Types|STRING]]
+
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
+
| width="90%" | Name
 
+
|-
===<span style="font-weight: normal;"><u><tt>SetValue</tt></u></span>===
+
| colspan="2" | &nbsp;
Sets the Value for the named property
+
|-
 
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
'''Parameters'''
+
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
+
|}
:[[Variable Types|STRING]] ''Name''
 
::Name of property to update
 
 
 
:[[Variable Types|STRING]] ''Value''
 
::The new value for the property
 
 
 
 
 
'''Return value'''
 
 
 
:''This call does not return a value''
 
 
 
 
 
===<span style="font-weight: normal;"><u><tt>GetList</tt></u></span>===
 
''<span style="color:red;">No additional information</span>''
 
 
 
 
 
 
 
'''Parameters'''
 
 
 
:[[Variable Types|STRING]] ''Name''
 
 
 
 
 
'''Return value'''
 
 
 
:[[Variable Types|STRING]]
 
  
  
Line 116: Line 264:
  
 
==Property reference==
 
==Property reference==
<span style="font-weight: normal;"><u>Channel</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''CHANNEL''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
DAC Channel number
+
| 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>DAC Output Pin</u></span>
+
|-
 
+
|-
This property is of type ''Single digital pin'' and can be referenced with the variable name ''PORT''.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Channel
DAC Output Pin
+
|-
 
+
| colspan="2" | DAC Channel number&nbsp;
<span style="font-weight: normal;"><u>Vref Option</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''VREFOP''.
+
| width="90%" | DAC Output Pin
 
+
|-
Selects the maximum reference value for the DAC
+
| colspan="2" | DAC Output Pin&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>Vref Voltage</u></span>
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | Vref Option
This property is of type ''Floating point'' and can be referenced with the variable name ''VrefVol''.
+
|-
 
+
| colspan="2" | Selects the maximum reference value for the DAC&nbsp;
Reference Voltage, Used to calculate the Voltage resolution.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
<span style="font-weight: normal;"><u>Control Bits</u></span>
+
| width="90%" | Vref Voltage
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''BITS''.
+
| colspan="2" | Reference Voltage, Used to calculate the Voltage resolution.&nbsp;
 
+
|-
Number of digital control bits
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Control Bits
<span style="font-weight: normal;"><u>Resolution</u></span>
+
|-
 
+
| colspan="2" | Number of digital control bits&nbsp;
This property is of type ''Line of text'' and can be referenced with the variable name ''Res''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
Maximum output resolution based on number of control bits.
+
| width="90%" | Resolution
 
+
|-
<span style="font-weight: normal;"><u>Voltage Resolution</u></span>
+
| colspan="2" | Maximum output resolution based on number of control bits.&nbsp;
 
+
|-
This property is of type ''Floating point'' and can be referenced with the variable name ''VoltRes''.
+
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 
+
| width="90%" | Voltage Resolution
Specifies the Resolution per digital bit in terms of Voltage.
+
|-
 
+
| colspan="2" | Specifies the Resolution per digital bit in terms of Voltage.&nbsp;
<span style="font-weight: normal;"><u>Scope Traces</u></span>
+
|-
 
+
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
This property is of type ''True or false'' and can be referenced with the variable name ''ScopeTraces''.
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
 
+
|-
Selects if the scope traces are automatically generated or not
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Scope Traces
 +
|-
 +
| colspan="2" | Selects if the scope traces are automatically generated or not&nbsp;
 +
|}

Revision as of 16:14, 16 November 2021

Author Matrix TSL
Version 2.0
Category Analog Output


DAC (Internal) component

Provides access to the onboard digital to analog converter (DAC) peripheral allowing for simple analogue output. Often the DAC output will be very low current and will need amplification using external circuitry to drive anything useful.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

Fc9-comp-macro.png SetOutput
Sets the output voltage of the DAC 
Fc9-u16-icon.png - UINT DAC_Value
The value to output to the DAC 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetValue
Gets the Name property value 
Fc9-string-icon.png - STRING Name
The name of the property 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png Disable
Disables the DAC output. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Enable
Enables the DAC Output. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetValue
Sets the Value for the named property 
Fc9-string-icon.png - STRING Name
Name of property to update 
Fc9-string-icon.png - STRING Value
The new value for the property 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetList
 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png SetPivotPos
Sets the position of the object the lever rotates around  
[[File:]] - PositionHandle
A handle to the position of the depressed location 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetAutoReset
Sets the state of the auto-reset flag If the flag is true (it is by default) then Button Helper will reset the state of each button on stop  
[[File:]] - State
Set true to reset to off on sim stop, else false to retain state 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetLatching
Sets whether the button is depressed when the mouse is released 
[[File:]] - Enabled
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Unregister
Removes the object to the list if present 
[[File:]] - Target
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SetMovementFor
Sets the movement in units or PI/16 steps for the button 
[[File:]] - Target
 
[[File:]] - Move
Movement to set to, default 4 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetList
Gets Named property List 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png GetList
returns Named property list 
Fc9-string-icon.png - STRING Name
 
Fc9-string-icon.png - STRING Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png Channel
DAC Channel number 
Fc9-type-5-icon.png DAC Output Pin
DAC Output Pin 
Fc9-type-16-icon.png Vref Option
Selects the maximum reference value for the DAC 
Fc9-type-15-icon.png Vref Voltage
Reference Voltage, Used to calculate the Voltage resolution. 
Fc9-type-14-icon.png Control Bits
Number of digital control bits 
Fc9-type-10-icon.png Resolution
Maximum output resolution based on number of control bits. 
Fc9-type-15-icon.png Voltage Resolution
Specifies the Resolution per digital bit in terms of Voltage. 
Fc9-conn-icon.png Connections
Fc9-conn-icon.png Simulations
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not