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

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(18 intermediate revisions by the same user not shown)
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.
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_DAC.fcfx FC_Comp_Source_DAC.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_DAC.fcfx FC_Comp_Source_DAC.fcfx]
 +
 +
==Detailed description==
  
==[[File:Component Icon 09222494_fbef_455b_9651_9e9e46592eb5.png|Image]] 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.
 
  
==Examples==
 
''<span style="color:red;">No additional examples</span>''
 
  
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>SetOutput</tt></u></span>===
 
Sets the output voltage of the DAC
 
  
'''Parameters'''
 
  
:[[Variable Types|UINT]] ''DAC_Value''
 
::The value to output to the DAC
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>Disable</tt></u></span>===
 
Disables the DAC output.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>Enable</tt></u></span>===
 
Enables the DAC Output.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
 +
''No detailed description exists yet for this component''
  
 +
==Examples==
  
==Simulation macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>GetValue</tt></u></span>===
 
Gets the Name property value
 
  
'''Parameters'''
 
  
:[[Variable Types|STRING]] ''Name''
 
::The name of the property
 
  
  
'''Return value'''
 
  
:[[Variable Types|STRING]]
 
  
  
===<span style="font-weight: normal;"><u><tt>SetValue</tt></u></span>===
 
Sets the Value for the named property
 
  
'''Parameters'''
 
  
:[[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]]
 
  
  
 +
''<span style="color:red;">No additional examples</span>''
  
  
==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''.
 
  
DAC Channel number
 
  
<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''.
 
  
DAC Output Pin
 
  
<span style="font-weight: normal;"><u>Vref Option</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''VREFOP''.
 
  
Selects the maximum reference value for the DAC
 
  
<span style="font-weight: normal;"><u>Vref Voltage</u></span>
 
  
This property is of type ''Floating point'' and can be referenced with the variable name ''VrefVol''.
 
  
Reference Voltage, Used to calculate the Voltage resolution.
 
  
<span style="font-weight: normal;"><u>Control Bits</u></span>
 
  
This property is of type ''Signed integer'' and can be referenced with the variable name ''BITS''.
 
  
Number of digital control bits
+
==Macro reference==
  
<span style="font-weight: normal;"><u>Resolution</u></span>
+
===Disable===
 +
{| 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 property is of type ''Line of text'' and can be referenced with the variable name ''Res''.
 
  
Maximum output resolution based on number of control bits.
+
===Enable===
 +
{| 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>Voltage Resolution</u></span>
 
  
This property is of type ''Floating point'' and can be referenced with the variable name ''VoltRes''.
+
===GetList===
 +
{| 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''
 +
|}
  
Specifies the Resolution per digital bit in terms of Voltage.
 
  
<span style="font-weight: normal;"><u>Scope Traces</u></span>
+
===GetValue===
 +
{| 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;" | '''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''
 +
|}
  
This property is of type ''True or false'' and can be referenced with the variable name ''ScopeTraces''.
 
  
Selects if the scope traces are automatically generated or not
+
===SetOutput===
 +
{| 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;" | '''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''
 +
|}
 +
 
 +
 
 +
===SetValue===
 +
{| 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''
 +
|}
 +
 
 +
 
 +
==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-16-icon.png]]
 +
| width="90%" | Channel
 +
|-
 +
| colspan="2" | DAC Channel number&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
 +
| width="90%" | DAC Output Pin
 +
|-
 +
| colspan="2" | DAC Output Pin&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Alt Pin
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | Vref Option
 +
|-
 +
| colspan="2" | Selects the maximum reference value for the DAC&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 +
| width="90%" | Vref Voltage
 +
|-
 +
| colspan="2" | Reference Voltage, Used to calculate the Voltage resolution.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 +
| width="90%" | Control Bits
 +
|-
 +
| colspan="2" | Number of digital control bits&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Resolution
 +
|-
 +
| colspan="2" | Maximum output resolution based on number of control bits.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-15-icon.png]]
 +
| width="90%" | Voltage Resolution
 +
|-
 +
| colspan="2" | Specifies the Resolution per digital bit in terms of Voltage.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 +
|-
 +
|-
 +
| 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;
 +
|}

Latest revision as of 10:24, 24 February 2023

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.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_DAC.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_DAC.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples









Macro reference

Disable

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


Enable

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


GetList

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


GetValue

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


SetOutput

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


SetValue

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


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-7-icon.png Alt 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 Simulation
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not