Component: ADC (CAL)
Author | Matrix Ltd |
Version | 1.3 (Release) |
Category | CAL |
Contents
ADC component
A low level implementation giving direct access to the CAL
Examples
No additional examples
Downloadable macro reference
Disable
Disables the current ADC channel
Call this once sampling is complete
Parameters
- This macro has no parameters
Return value
- This call does not return a value
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
Parameters
- 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
Return value
- This call does not return a value
Sample
Blocking call to read a sample on the currently enabled channel
Parameters
- BYTE Sample_Mode
- True to enable full-width sample (10 or 12 bits), else false for 8 bit
Return value
- UINT : The sample value, as an 8, 10 or 12 bit value 0->N
Simulation macro reference
GetValue
Gets the Name property value
Parameters
- STRING Name
- The name of the property
Return value
SetValue
Sets the Value for the named property
Parameters
- STRING Name
- Name of property to update
- STRING Value
- The new value for the property
Return value
- This call does not return a value
GetList
No additional information
Parameters
- STRING Name
Return value
Property reference
Channel
This property is of type Signed integer and can be referenced with the variable name CHANNEL.
ADC Channel number
Vref Option
This property is of type Fixed list of ints and can be referenced with the variable name VREFOP.
selects the reference voltage option
Vref+ (x10mV)
This property is of type Signed integer and can be referenced with the variable name VREFVOL.
sets the value of the reference voltage (used for conversion calculations)
Acq Time
This property is of type Signed integer and can be referenced with the variable name ACTIME.
ADC acquisition time
Conv Speed
This property is of type Fixed list of ints and can be referenced with the variable name CONVSP.
Conversion speed option
Type
This property is of type Signed integer and can be referenced with the variable name TYPE.
No additional information
Bits
This property is of type Signed integer and can be referenced with the variable name BITS.
No additional information
Scope Traces
This property is of type True or false and can be referenced with the variable name ScopeTraces.
Selects if the scope traces are automatically generated or not