ADC  9.2
Analog to Digital Conversor library for the Teensy 3.5 microprocessor
ADC_settings Namespace Reference

Board-dependent settings. More...

Enumerations

enum  ADC_REFERENCE : uint8_t { ADC_REFERENCE::REF_3V3 = static_cast<uint8_t>(ADC_REF_SOURCE::REF_DEFAULT), ADC_REFERENCE::REF_1V2 = static_cast<uint8_t>(ADC_REF_SOURCE::REF_ALT), ADC_REFERENCE::REF_EXT, NONE }
 Voltage reference for the ADC default is the external, that is connected to the 3.3V supply. To use the external simply connect AREF to a different voltage alt is connected to the 1.2 V ref. More...
 
enum  ADC_INTERNAL_SOURCE : uint8_t {
  ADC_INTERNAL_SOURCE::TEMP_SENSOR = 24, ADC_INTERNAL_SOURCE::VREF_OUT = 28, ADC_INTERNAL_SOURCE::BANDGAP = 25, ADC_INTERNAL_SOURCE::VREFH = 26,
  ADC_INTERNAL_SOURCE::VREFL = 27
}
 Other ADC sources to measure, such as the temperature sensor. More...
 
enum  ADC_CONVERSION_SPEED : uint8_t {
  ADC_CONVERSION_SPEED::VERY_LOW_SPEED, ADC_CONVERSION_SPEED::LOW_SPEED, ADC_CONVERSION_SPEED::MED_SPEED, ADC_CONVERSION_SPEED::HIGH_SPEED_16BITS,
  ADC_CONVERSION_SPEED::HIGH_SPEED, ADC_CONVERSION_SPEED::VERY_HIGH_SPEED, ADC_CONVERSION_SPEED::ADACK_2_4, ADC_CONVERSION_SPEED::ADACK_4_0,
  ADC_CONVERSION_SPEED::ADACK_5_2, ADC_CONVERSION_SPEED::ADACK_6_2
}
 ADC conversion speed. Common set of options to select the ADC clock speed F_ADCK, which depends on ADC_F_BUS, except for the ADACK_X_Y options that are independent. This selection affects the sampling speed too. Note: the F_ADCK speed is not equal to the conversion speed; any measurement takes several F_ADCK cycles to complete including the sampling and conversion steps. More...
 
enum  ADC_SAMPLING_SPEED : uint8_t {
  ADC_SAMPLING_SPEED::VERY_LOW_SPEED, ADC_SAMPLING_SPEED::LOW_SPEED, ADC_SAMPLING_SPEED::MED_SPEED, ADC_SAMPLING_SPEED::HIGH_SPEED,
  ADC_SAMPLING_SPEED::VERY_HIGH_SPEED
}
 ADC sampling speed. It selects how many ADCK clock cycles to add. More...
 

Detailed Description

Board-dependent settings.

Enumeration Type Documentation

◆ ADC_CONVERSION_SPEED

enum ADC_settings::ADC_CONVERSION_SPEED : uint8_t
strong

ADC conversion speed. Common set of options to select the ADC clock speed F_ADCK, which depends on ADC_F_BUS, except for the ADACK_X_Y options that are independent. This selection affects the sampling speed too. Note: the F_ADCK speed is not equal to the conversion speed; any measurement takes several F_ADCK cycles to complete including the sampling and conversion steps.

Note: ADACK_X_Y is useful if you are using the Teensy at a very low clock frequency but want faster conversions, but if F_BUS<F_ADCK, you can't use VERY_HIGH_SPEED for sampling speed.

Enumerator
VERY_LOW_SPEED 

is guaranteed to be the lowest possible speed within specs for resolutions less than 16 bits.

LOW_SPEED 

is guaranteed to be the lowest possible speed within specs for all resolutions.

MED_SPEED 

is always >= LOW_SPEED and <= HIGH_SPEED.

HIGH_SPEED_16BITS 

is guaranteed to be the highest possible speed within specs for all resolutions.

HIGH_SPEED 

is guaranteed to be the highest possible speed within specs for resolutions less than 16 bits.

VERY_HIGH_SPEED 

may be out of specs

ADACK_2_4 

2.4 MHz asynchronous ADC clock (independent of the global clocks F_CPU or F_BUS)

ADACK_4_0 

4.0 MHz asynchronous ADC clock (independent of the global clocks F_CPU or F_BUS)

ADACK_5_2 

5.2 MHz asynchronous ADC clock (independent of the global clocks F_CPU or F_BUS)

ADACK_6_2 

6.2 MHz asynchronous ADC clock (independent of the global clocks F_CPU or F_BUS)

Definition at line 562 of file settings_defines.h.

◆ ADC_INTERNAL_SOURCE

enum ADC_settings::ADC_INTERNAL_SOURCE : uint8_t
strong

Other ADC sources to measure, such as the temperature sensor.

Enumerator
TEMP_SENSOR 

Temperature sensor.

VREF_OUT 

1.2 V reference

BANDGAP 

BANDGAP

VREFH 

High VREF

VREFL 

Low VREF.

Definition at line 284 of file settings_defines.h.

◆ ADC_REFERENCE

enum ADC_settings::ADC_REFERENCE : uint8_t
strong

Voltage reference for the ADC default is the external, that is connected to the 3.3V supply. To use the external simply connect AREF to a different voltage alt is connected to the 1.2 V ref.

Enumerator
REF_3V3 

3.3 volts

REF_1V2 

1.2 volts

REF_EXT 

External VREF

Definition at line 178 of file settings_defines.h.

◆ ADC_SAMPLING_SPEED

enum ADC_settings::ADC_SAMPLING_SPEED : uint8_t
strong

ADC sampling speed. It selects how many ADCK clock cycles to add.

Enumerator
VERY_LOW_SPEED 

is the lowest possible sampling speed (+24 ADCK).

LOW_SPEED 

adds +16 ADCK.

MED_SPEED 

adds +10 ADCK.

HIGH_SPEED 

adds +6 ADCK.

VERY_HIGH_SPEED 

is the highest possible sampling speed (0 ADCK added).

Definition at line 603 of file settings_defines.h.