Difference between revisions of "Component: Input ADC (DSP)"
From Flowcode Help
Jump to navigationJump to search(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | {| style="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 | + | | 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. | ||
− | == | + | ==Component Pack== |
− | |||
− | |||
− | |||
− | + | DSP | |
− | + | ==Detailed description== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ''No detailed description exists yet for this component'' | |
− | + | ==Examples== | |
− | |||
− | |||
− | |||
− | + | ''<span style="color:red;">No additional examples</span>'' | |
+ | ==Downloadable macro reference== | ||
− | === | + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" |
− | Adds a single ADC sample to the current location in the specified buffer. | + | |- |
+ | | 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. | ||
+ | |- | ||
+ | |- | ||
+ | | 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'' | ||
+ | |} | ||
− | |||
− | 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;" | '''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. | ||
+ | |- | ||
+ | |- | ||
+ | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
+ | | width="90%" | SampleDelay | ||
+ | |- | ||
+ | | colspan="2" | Number of us in between each sample. | ||
+ | |- | ||
+ | | 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== | ==Property reference== | ||
− | |||
− | + | {| 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''' | |
− | + | |- | |
− | + | |- | |
− | + | | 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. | |
− | + | |- | |
− | + | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | |
− | + | | 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. |
− | + | |- | |
− | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections | |
− | + | |- | |
− | + | |- | |
− | 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? | |
− | 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]] | |
− | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Settings | |
− | + | |- | |
− | + | |- | |
− | + | | 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. |
− | + | |- | |
− | 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 | |
− | + | |- | |
− | + | | 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. | |
− | + | |- | |
− | + | | 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 |
− | + | |- | |
− | + | | 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. | |
− | + | |- | |
− | + | | 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. | |
− | 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 |
− | + | |} | |
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 17:19, 9 November 2022
Author | Matrix Ltd |
Version | 1.2 |
Category | DSP |
Contents
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