Difference between revisions of "Component: Input ADC (DSP)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(6 intermediate revisions by 2 users not shown)
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
 
|}
 
|}
  
  
 +
==Input ADC component==
 +
Allows the values from a buffer to be assigned driectly from an analog enabled pin.  Either a single sample at a time or a number of samples. Auto scales the digital value to fill the entire range of the specified buffer type.
  
==[[File:Component Icon 3420d1ea_bc10_4727_8419_746101b8dc13.png|Image]] Input ADC component==
+
==Component Pack==
Allows the values from a buffer to be assigned driectly from an analog enabled pin.
 
Either a single sample at a time or a number of samples.
 
Auto scales the digital value to fill the entire range of the specified buffer type.
 
  
==Examples==
+
DSP
''<span style="color:red;">No additional examples</span>''
 
  
 +
==Detailed description==
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>AddSample</tt></u></span>===
 
Adds a single ADC sample to the current location in the specified buffer.
 
  
If Auto Scale is enabled then the sample will be scaled to correctly fit inside the buffer.
 
  
Auto increments current location.
 
  
'''Parameters'''
+
''No detailed description exists yet for this component''
  
:''This macro has no parameters''
+
==Examples==
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
===<span style="font-weight: normal;"><u><tt>AddSampleArray</tt></u></span>===
+
''<span style="color:red;">No additional examples</span>''
Adds a single ADC sample to the current location in the specified buffer.
 
  
If Auto Scale is enabled then the sample will be scaled to correctly fit inside the buffer.
+
==Downloadable macro reference==
  
Auto increments current location.
+
{| 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;" | '''AddSample'''
 +
|-
 +
| colspan="2" | Adds a single ADC sample to the current location in the specified buffer. If Auto Scale is enabled then the sample will be scaled to correctly fit inside the buffer. Auto increments current 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''
 +
|}
  
'''Parameters'''
 
  
:[[Variable Types|UINT]] ''SampleDelay''
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
::Number of us in between each sample.
+
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AddSampleArray'''
 +
|-
 +
| colspan="2" | Adds a single ADC sample to the current location in the specified buffer. If Auto Scale is enabled then the sample will be scaled to correctly fit inside the buffer. Auto increments current location.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | SampleDelay
 +
|-
 +
| colspan="2" | Number of us in between 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''
 +
|}
  
  
'''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>Buffer Size</u></span>
 
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''BuffSize''.
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
+
|-
Number of individual elements the buffer can store, default 1.
+
| 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>Buffer Type</u></span>
+
|-
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''BuffType''.
+
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
+
| width="90%" | Buffer Size
Sets the buffer data type, data is automatically scaled to fit and make full use of the data type.
+
|-
 
+
| colspan="2" | Number of individual elements the buffer can store, default 1.&nbsp;
<span style="font-weight: normal;"><u>Channel</u></span>
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
This property is of type ''Single analog pin'' and can be referenced with the variable name ''adc_base1::channel''.
+
| width="90%" | Buffer Type
 
+
|-
Analogue Input Channel - Which pin is the analogue input connected to?
+
| colspan="2" | Sets the buffer data type, data is automatically scaled to fit and make full use of the data type.&nbsp;
 
+
|-
<span style="font-weight: normal;"><u>VRef option</u></span>
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''adc_base1::vrefop''.
+
|-
 
+
|-
Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage
+
| width="10%" align="center" | [[File:Fc9-type-6-icon.png]]
 
+
| width="90%" | Channel
VDD - Defines the microcontrollers power supply pin as the max reference,
+
|-
 
+
| colspan="2" | Analogue Input Channel - Which pin is the analogue input connected to?&nbsp;
VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage.
+
|-
 
+
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
<span style="font-weight: normal;"><u>Conversion speed</u></span>
+
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Settings
 
+
|-
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''adc_base1::convspd''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
Clock setting to select how fast the ADC peripheral will perform an ADC conversion.
+
| width="90%" | Auto Adjust Scale
 
+
|-
The FRC setting is based on a RC time base and so will vary with temperature and pressure.
+
| colspan="2" | Yes: Automatically convert ADC samples to match the full bit depth of the DSP buffer. No: Leave the ADC samples at the native bit depth.&nbsp;
 
+
|-
Other settings are generally based on divisions of the master clock.
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
+
| width="90%" | VRef option
<span style="font-weight: normal;"><u>Acquisition cycles</u></span>
+
|-
 
+
| colspan="2" | Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage.&nbsp;
This property is of type ''Signed integer'' and can be referenced with the variable name ''adc_base1::actime''.
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
Number of micro seconds to wait for the ADC input to charge before starting the analogue sample.
+
| width="90%" | Conversion speed
 
+
|-
<span style="font-weight: normal;"><u>Bit Depth</u></span>
+
| colspan="2" | Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock.&nbsp;
 
+
|-
This property is of type ''Signed integer'' and can be referenced with the variable name ''adc_base1::bits''.
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
 
+
| width="90%" | Acquisition cycles
Maximum number of digital bits the ADC can sample.
+
|-
 
+
| colspan="2" | Number of micro seconds to wait for the ADC input to charge before starting the analogue sample.&nbsp;
8 bit = ADC range 0 - 255
+
|-
 
+
| width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
10 bit = ADC range 0 - 1023  
+
| width="90%" | Bit Depth
 
+
|-
12 bit = ADC range 0 - 4095
+
| colspan="2" | Maximum number of digital bits the ADC can sample. 8 bit = ADC range 0 - 255 10 bit = ADC range 0 - 1023 12 bit = ADC range 0 - 4095&nbsp;
 
+
|}
<span style="font-weight: normal;"><u>Scope Traces</u></span>
 
 
 
This property is of type ''True or false'' and can be referenced with the variable name ''adc_base1::ScopeTraces''.
 
 
 
Selects if the scope traces are automatically generated or not
 

Latest revision as of 17:19, 9 November 2022

Author Matrix Ltd
Version 1.2
Category DSP


Input ADC component

Allows the values from a buffer to be assigned driectly from an analog enabled pin. Either a single sample at a time or a number of samples. Auto scales the digital value to fill the entire range of the specified buffer type.

Component Pack

DSP

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Downloadable macro reference

Fc9-comp-macro.png AddSample
Adds a single ADC sample to the current location in the specified buffer. If Auto Scale is enabled then the sample will be scaled to correctly fit inside the buffer. Auto increments current location. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png AddSampleArray
Adds a single ADC sample to the current location in the specified buffer. If Auto Scale is enabled then the sample will be scaled to correctly fit inside the buffer. Auto increments current location. 
Fc9-u16-icon.png - UINT SampleDelay
Number of us in between each sample. 
Fc9-void-icon.png - VOID Return



Property reference

Fc9-prop-icon.png Properties
Fc9-type-21-icon.png Buffer Size
Number of individual elements the buffer can store, default 1. 
Fc9-type-16-icon.png Buffer Type
Sets the buffer data type, data is automatically scaled to fit and make full use of the data type. 
Fc9-conn-icon.png Connections
Fc9-type-6-icon.png Channel
Analogue Input Channel - Which pin is the analogue input connected to? 
Fc9-conn-icon.png Settings
Fc9-type-7-icon.png Auto Adjust Scale
Yes: Automatically convert ADC samples to match the full bit depth of the DSP buffer. No: Leave the ADC samples at the native bit depth. 
Fc9-type-16-icon.png VRef option
Defines what is used as the ADC maximum reference. ADC Range = GND to VRef Voltage VDD - Defines the microcontrollers power supply pin as the max reference, VREF+ Pin - Dedicated pin on the microcontroller to allow for a variable reference voltage. 
Fc9-type-16-icon.png Conversion speed
Clock setting to select how fast the ADC peripheral will perform an ADC conversion. The FRC setting is based on a RC time base and so will vary with temperature and pressure. Other settings are generally based on divisions of the master clock. 
Fc9-type-14-icon.png Acquisition cycles
Number of micro seconds to wait for the ADC input to charge before starting the analogue sample. 
Fc9-type-14-icon.png Bit Depth
Maximum number of digital bits the ADC can sample. 8 bit = ADC range 0 - 255 10 bit = ADC range 0 - 1023 12 bit = ADC range 0 - 4095