Component: ADC (CAL) (Misc)

From Flowcode Help
Jump to navigationJump to search
Author Matrix TSL
Version 2.0
Category Misc


ADC component

CAL - Code Abstraction Layer A low level implementation giving direct access to the analogue to digital converter peripheral.

Component Source Code

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

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

Detailed description

No detailed description exists yet for this component

Examples

Example showing how to build a component using a CAL component Using CAL Components.









Macro reference

Disable

Fc9-comp-macro.png Disable
Disables the current ADC channel Call this once sampling is complete 
Fc9-void-icon.png - VOID Return


Enable

Fc9-comp-macro.png Enable
Enables sampling of the ADC channel This is called every time a new ADC channel needs configuring to ADC mode [u]Only one ADC channel may be enabled at any time[/u] When sampling is complete, call Disable() to restore the pin 
Fc9-u8-icon.png - BYTE Channel
A value >= 0 specifying the ADC channel 
Fc9-u8-icon.png - BYTE Conv_Speed
Chip-specific rate of change read from the FCD <ADC.ConfSpeed> 
Fc9-u8-icon.png - BYTE Vref
0 to disable Vref mode, else 1 
Fc9-u8-icon.png - BYTE T_Charge
Aquisition time to wait in micro seconds 
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


Sample

Fc9-comp-macro.png Sample
Blocking call to read a sample on the currently enabled channel 
Fc9-u8-icon.png - BYTE Sample_Mode
True to enable full-width sample (10 or 12 bits), else false for 8 bit 
Fc9-u16-icon.png - UINT 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 Peripheral
 
Fc9-type-6-icon.png Channel ADC Pin
ADC Channel number 
Fc9-type-16-icon.png Vref Option
selects the reference voltage option 
Fc9-type-14-icon.png Vref+ (x10mV)
sets the value of the reference voltage (used for conversion calculations) 
Fc9-type-16-icon.png Acq Time
ADC Aquisition time 
Fc9-type-7-icon.png Use FRC clock
Uses the internal fixed RC clock to perform ADC conversions. In most cases it is better to switch this off and use the conversion speed to ensure sampling is consistent. 
Fc9-type-16-icon.png Conv Speed
Conversion speed option 
Fc9-type-14-icon.png Type
 
Fc9-type-14-icon.png Bits
 
Fc9-type-7-icon.png Custom Pins
 
Fc9-type-7-icon.png Has DMA
 
Fc9-type-7-icon.png Use DMA
 
Fc9-type-16-icon.png DMA Trigger
 
Fc9-type-7-icon.png Has Scanning
 
Fc9-type-7-icon.png Use Scanning
 
Fc9-conn-icon.png Simulation
Fc9-type-7-icon.png Scope Traces
Selects if the scope traces are automatically generated or not