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
|
GetValue
|
Gets the Name property value
|
- STRING
|
Name
|
The name of the property
|
- STRING
|
Return
|
|
Disable
|
Disables the current ADC channel Call this once sampling is complete
|
- VOID
|
Return
|
|
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
|
- BYTE
|
Channel
|
A value >= 0 specifying the ADC channel
|
- BYTE
|
Conv_Speed
|
Chip-specific rate of change read from the FCD <ADC.ConfSpeed>
|
- BYTE
|
Vref
|
0 to disable Vref mode, else 1
|
- BYTE
|
T_Charge
|
Aquisition time to wait in micro seconds
|
- VOID
|
Return
|
|
Sample
|
Blocking call to read a sample on the currently enabled channel
|
- BYTE
|
Sample_Mode
|
True to enable full-width sample (10 or 12 bits), else false for 8 bit
|
- UINT
|
Return
|
|
SetValue
|
Sets the Value for the named property
|
- STRING
|
Name
|
Name of property to update
|
- STRING
|
Value
|
The new value for the property
|
- VOID
|
Return
|
|
GetList
|
|
- STRING
|
Name
|
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
Peripheral
|
|
|
Channel ADC Pin
|
ADC Channel number
|
|
Vref Option
|
selects the reference voltage option
|
|
Vref+ (x10mV)
|
sets the value of the reference voltage (used for conversion calculations)
|
|
Acq Time
|
ADC Aquisition time
|
|
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.
|
|
Conv Speed
|
Conversion speed option
|
|
Type
|
|
|
Bits
|
|
|
Custom Pins
|
|
|
Has DMA
|
|
|
Use DMA
|
|
|
DMA Trigger
|
|
|
Has Scanning
|
|
|
Use Scanning
|
|
|
Simulation
|
|
Scope Traces
|
Selects if the scope traces are automatically generated or not
|
==Macro reference==
|
GetValue
|
Gets the Name property value
|
- STRING
|
Name
|
The name of the property
|
- STRING
|
Return
|
|
Disable
|
Disables the current ADC channel Call this once sampling is complete
|
- VOID
|
Return
|
|
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
|
- BYTE
|
Channel
|
A value >= 0 specifying the ADC channel
|
- BYTE
|
Conv_Speed
|
Chip-specific rate of change read from the FCD <ADC.ConfSpeed>
|
- BYTE
|
Vref
|
0 to disable Vref mode, else 1
|
- BYTE
|
T_Charge
|
Aquisition time to wait in micro seconds
|
- VOID
|
Return
|
|
Sample
|
Blocking call to read a sample on the currently enabled channel
|
- BYTE
|
Sample_Mode
|
True to enable full-width sample (10 or 12 bits), else false for 8 bit
|
- UINT
|
Return
|
|
SetValue
|
Sets the Value for the named property
|
- STRING
|
Name
|
Name of property to update
|
- STRING
|
Value
|
The new value for the property
|
- VOID
|
Return
|
|
GetList
|
|
- STRING
|
Name
|
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
Peripheral
|
|
|
Channel ADC Pin
|
ADC Channel number
|
|
Vref Option
|
selects the reference voltage option
|
|
Vref+ (x10mV)
|
sets the value of the reference voltage (used for conversion calculations)
|
|
Acq Time
|
ADC Aquisition time
|
|
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.
|
|
Conv Speed
|
Conversion speed option
|
|
Type
|
|
|
Bits
|
|
|
Custom Pins
|
|
|
Has DMA
|
|
|
Use DMA
|
|
|
DMA Trigger
|
|
|
Has Scanning
|
|
|
Use Scanning
|
|
|
Simulation
|
|
Scope Traces
|
Selects if the scope traces are automatically generated or not
|
==Macro reference==
|
GetValue
|
Gets the Name property value
|
- STRING
|
Name
|
The name of the property
|
- STRING
|
Return
|
|
Disable
|
Disables the current ADC channel Call this once sampling is complete
|
- VOID
|
Return
|
|
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
|
- BYTE
|
Channel
|
A value >= 0 specifying the ADC channel
|
- BYTE
|
Conv_Speed
|
Chip-specific rate of change read from the FCD <ADC.ConfSpeed>
|
- BYTE
|
Vref
|
0 to disable Vref mode, else 1
|
- BYTE
|
T_Charge
|
Aquisition time to wait in micro seconds
|
- VOID
|
Return
|
|
Sample
|
Blocking call to read a sample on the currently enabled channel
|
- BYTE
|
Sample_Mode
|
True to enable full-width sample (10 or 12 bits), else false for 8 bit
|
- UINT
|
Return
|
|
SetValue
|
Sets the Value for the named property
|
- STRING
|
Name
|
Name of property to update
|
- STRING
|
Value
|
The new value for the property
|
- VOID
|
Return
|
|
GetList
|
|
- STRING
|
Name
|
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
Peripheral
|
|
|
Channel ADC Pin
|
ADC Channel number
|
|
Vref Option
|
selects the reference voltage option
|
|
Vref+ (x10mV)
|
sets the value of the reference voltage (used for conversion calculations)
|
|
Acq Time
|
ADC Aquisition time
|
|
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.
|
|
Conv Speed
|
Conversion speed option
|
|
Type
|
|
|
Bits
|
|
|
Custom Pins
|
|
|
Has DMA
|
|
|
Use DMA
|
|
|
DMA Trigger
|
|
|
Has Scanning
|
|
|
Use Scanning
|
|
|
Simulation
|
|
Scope Traces
|
Selects if the scope traces are automatically generated or not
|
==Macro reference==
|
GetValue
|
Gets the Name property value
|
- STRING
|
Name
|
The name of the property
|
- STRING
|
Return
|
|
Disable
|
Disables the current ADC channel Call this once sampling is complete
|
- VOID
|
Return
|
|
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
|
- BYTE
|
Channel
|
A value >= 0 specifying the ADC channel
|
- BYTE
|
Conv_Speed
|
Chip-specific rate of change read from the FCD <ADC.ConfSpeed>
|
- BYTE
|
Vref
|
0 to disable Vref mode, else 1
|
- BYTE
|
T_Charge
|
Aquisition time to wait in micro seconds
|
- VOID
|
Return
|
|
Sample
|
Blocking call to read a sample on the currently enabled channel
|
- BYTE
|
Sample_Mode
|
True to enable full-width sample (10 or 12 bits), else false for 8 bit
|
- UINT
|
Return
|
|
SetValue
|
Sets the Value for the named property
|
- STRING
|
Name
|
Name of property to update
|
- STRING
|
Value
|
The new value for the property
|
- VOID
|
Return
|
|
GetList
|
|
- STRING
|
Name
|
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
Peripheral
|
|
|
Channel ADC Pin
|
ADC Channel number
|
|
Vref Option
|
selects the reference voltage option
|
|
Vref+ (x10mV)
|
sets the value of the reference voltage (used for conversion calculations)
|
|
Acq Time
|
ADC Aquisition time
|
|
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.
|
|
Conv Speed
|
Conversion speed option
|
|
Type
|
|
|
Bits
|
|
|
Custom Pins
|
|
|
Has DMA
|
|
|
Use DMA
|
|
|
DMA Trigger
|
|
|
Has Scanning
|
|
|
Use Scanning
|
|
|
Simulation
|
|
Scope Traces
|
Selects if the scope traces are automatically generated or not
|
==Macro reference==
|
GetValue
|
Gets the Name property value
|
- STRING
|
Name
|
The name of the property
|
- STRING
|
Return
|
|
Disable
|
Disables the current ADC channel Call this once sampling is complete
|
- VOID
|
Return
|
|
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
|
- BYTE
|
Channel
|
A value >= 0 specifying the ADC channel
|
- BYTE
|
Conv_Speed
|
Chip-specific rate of change read from the FCD <ADC.ConfSpeed>
|
- BYTE
|
Vref
|
0 to disable Vref mode, else 1
|
- BYTE
|
T_Charge
|
Aquisition time to wait in micro seconds
|
- VOID
|
Return
|
|
Sample
|
Blocking call to read a sample on the currently enabled channel
|
- BYTE
|
Sample_Mode
|
True to enable full-width sample (10 or 12 bits), else false for 8 bit
|
- UINT
|
Return
|
|
SetValue
|
Sets the Value for the named property
|
- STRING
|
Name
|
Name of property to update
|
- STRING
|
Value
|
The new value for the property
|
- VOID
|
Return
|
|
GetList
|
|
- STRING
|
Name
|
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
Peripheral
|
|
|
Channel ADC Pin
|
ADC Channel number
|
|
Vref Option
|
selects the reference voltage option
|
|
Vref+ (x10mV)
|
sets the value of the reference voltage (used for conversion calculations)
|
|
Acq Time
|
ADC Aquisition time
|
|
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.
|
|
Conv Speed
|
Conversion speed option
|
|
Type
|
|
|
Bits
|
|
|
Custom Pins
|
|
|
Has DMA
|
|
|
Use DMA
|
|
|
DMA Trigger
|
|
|
Has Scanning
|
|
|
Use Scanning
|
|
|
Simulation
|
|
Scope Traces
|
Selects if the scope traces are automatically generated or not
|