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

From Flowcode Help
Jump to navigationJump to search
(Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix Ltd |- | width="20%" style="color:gray;" | Version | 1.2 |- | width="20%" style="color:gray...")
 
Line 20: Line 20:
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 30: Line 32:
  
 
==Examples==
 
==Examples==
 +
 +
  
  
Line 39: Line 43:
 
''<span style="color:red;">No additional examples</span>''
 
''<span style="color:red;">No additional examples</span>''
  
==Downloadable macro reference==
+
==Macro reference==
  
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"

Revision as of 14:10, 20 January 2023

Author Matrix Ltd
Version 1.2
Category DSP Inputs


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 Source Code

Please click here for the component source code: FC_Comp_Source_DSP_ADCInput.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

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-21-icon.png Bit Depth
Maximum number of bits for each ADC sample.