ATmega2560
Hardware definitions
Loading...
Searching...
No Matches
atmega2560::adc Namespace Reference

Adc definitions. More...

Enumerations

enum class  Channel : uint8_t {
  ADC0 = 0 , ADC1 = 1 , ADC2 = 2 , ADC3 = 3 ,
  ADC4 = 4 , ADC5 = 5 , ADC6 = 6 , ADC7 = 7 ,
  ADC8 = 8 , ADC9 = 9 , ADC10 = 10 , ADC11 = 11 ,
  ADC12 = 12 , ADC13 = 13 , ADC14 = 14 , ADC15 = 15
}
 16 external ADC channels. More...
enum class  MuxSelection : uint8_t {
  SingleEndedADC0 = 0x00 , SingleEndedADC1 = 0x01 , SingleEndedADC2 = 0x02 , SingleEndedADC3 = 0x03 ,
  SingleEndedADC4 = 0x04 , SingleEndedADC5 = 0x05 , SingleEndedADC6 = 0x06 , SingleEndedADC7 = 0x07 ,
  DifferentialADC0_ADC0_Gain10 = 0x08 , DifferentialADC1_ADC0_Gain10 = 0x09 , DifferentialADC0_ADC0_Gain200 = 0x0A , DifferentialADC1_ADC0_Gain200 = 0x0B ,
  DifferentialADC2_ADC2_Gain10 = 0x0C , DifferentialADC3_ADC2_Gain10 = 0x0D , DifferentialADC2_ADC2_Gain200 = 0x0E , DifferentialADC3_ADC2_Gain200 = 0x0F ,
  DifferentialADC0_ADC1_Gain1 = 0x10 , DifferentialADC1_ADC1_Gain1 = 0x11 , DifferentialADC2_ADC1_Gain1 = 0x12 , DifferentialADC3_ADC1_Gain1 = 0x13 ,
  DifferentialADC4_ADC1_Gain1 = 0x14 , DifferentialADC5_ADC1_Gain1 = 0x15 , DifferentialADC6_ADC1_Gain1 = 0x16 , DifferentialADC7_ADC1_Gain1 = 0x17 ,
  DifferentialADC0_ADC2_Gain1 = 0x18 , DifferentialADC1_ADC2_Gain1 = 0x19 , DifferentialADC2_ADC2_Gain1 = 0x1A , DifferentialADC3_ADC2_Gain1 = 0x1B ,
  DifferentialADC4_ADC2_Gain1 = 0x1C , DifferentialADC5_ADC2_Gain1 = 0x1D , InternalBandgap1V1 = 0x1E , Ground = 0x1F ,
  SingleEndedADC8 = 0x20 , SingleEndedADC9 = 0x21 , SingleEndedADC10 = 0x22 , SingleEndedADC11 = 0x23 ,
  SingleEndedADC12 = 0x24 , SingleEndedADC13 = 0x25 , SingleEndedADC14 = 0x26 , SingleEndedADC15 = 0x27 ,
  DifferentialADC8_ADC8_Gain10 = 0x28 , DifferentialADC9_ADC8_Gain10 = 0x29 , DifferentialADC8_ADC8_Gain200 = 0x2A , DifferentialADC9_ADC8_Gain200 = 0x2B ,
  DifferentialADC10_ADC10_Gain10 = 0x2C , DifferentialADC11_ADC10_Gain10 = 0x2D , DifferentialADC10_ADC10_Gain200 = 0x2E , DifferentialADC11_ADC10_Gain200 = 0x2F ,
  DifferentialADC8_ADC9_Gain1 = 0x30 , DifferentialADC9_ADC9_Gain1 = 0x31 , DifferentialADC10_ADC9_Gain1 = 0x32 , DifferentialADC11_ADC9_Gain1 = 0x33 ,
  DifferentialADC12_ADC9_Gain1 = 0x34 , DifferentialADC13_ADC9_Gain1 = 0x35 , DifferentialADC14_ADC9_Gain1 = 0x36 , DifferentialADC15_ADC9_Gain1 = 0x37 ,
  DifferentialADC8_ADC10_Gain1 = 0x38 , DifferentialADC9_ADC10_Gain1 = 0x39 , DifferentialADC10_ADC10_Gain1 = 0x3A , DifferentialADC11_ADC10_Gain1 = 0x3B ,
  DifferentialADC12_ADC10_Gain1 = 0x3C , DifferentialADC13_ADC10_Gain1 = 0x3D
}
 Complete valid MUX5:0 selections from datasheet Table 26-4. More...
enum class  InputPin : uint8_t {
  ADC0 = 0x50 , ADC1 = 0x51 , ADC2 = 0x52 , ADC3 = 0x53 ,
  ADC4 = 0x54 , ADC5 = 0x55 , ADC6 = 0x56 , ADC7 = 0x57 ,
  ADC8 = 0x90 , ADC9 = 0x91 , ADC10 = 0x92 , ADC11 = 0x93 ,
  ADC12 = 0x94 , ADC13 = 0x95 , ADC14 = 0x96 , ADC15 = 0x97
}
 ADC logical GPIO pin. More...
enum class  Reference : uint8_t { AREF = 0 , AVCC = 1 , Internal1V1 = 2 , Internal2V56 = 3 }
 Reference voltage selection encodings. More...
enum class  TriggerSource : uint8_t {
  FreeRunning = 0 , AnalogComparator = 1 , ExternalInterrupt0 = 2 , Timer0CompareMatchA = 3 ,
  Timer0Overflow = 4 , Timer1CompareMatchB = 5 , Timer1Overflow = 6 , Timer1CaptureEvent = 7
}
 ADC trigger sources. More...
enum class  Prescaler : uint16_t {
  Divide2 = 2 , Divide4 = 4 , Divide8 = 8 , Divide16 = 16 ,
  Divide32 = 32 , Divide64 = 64 , Divide128 = 128
}
 ADC prescalers. More...
enum  : uint16_t {
  resolution_bits = 10 , external_channel_count = 16 , mux_selection_bits = 6 , valid_mux_selection_count = 62 ,
  has_differential_inputs = 1 , has_gain_stage = 1 , differential_gain_10x = 10 , differential_gain_200x = 200 ,
  differential_gain_accuracy_min_supply_mv = 2700 , differential_resolution_bits_at_gain_1x = 8 , differential_resolution_bits_at_gain_10x = 8 , differential_resolution_bits_at_gain_200x = 7 ,
  has_internal_1v1_reference = 1 , has_internal_2v56_reference = 1
}
 ADC capabilities and limits. More...

Detailed Description

Adc definitions.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum : uint16_t

ADC capabilities and limits.

Enumerator
resolution_bits 

ADC resolution.

external_channel_count 

External single-ended channels.

mux_selection_bits 

MUX5:0 field width.

valid_mux_selection_count 

Valid MUX5:0 encodings.

has_differential_inputs 

Differential input selections are available.

has_gain_stage 

Differential gain stage is available.

differential_gain_10x 

Differential gain setting 10x.

differential_gain_200x 

Differential gain setting 200x.

differential_gain_accuracy_min_supply_mv 

Minimum supply for specified 10x/200x gain accuracy.

differential_resolution_bits_at_gain_1x 

Expected resolution at 1x gain.

differential_resolution_bits_at_gain_10x 

Expected resolution at 10x gain.

differential_resolution_bits_at_gain_200x 

Expected resolution at 200x gain.

has_internal_1v1_reference 

Internal 1.1 V reference is available.

has_internal_2v56_reference 

Internal 2.56 V reference is available.

◆ Channel

enum class atmega2560::adc::Channel : uint8_t
strong

16 external ADC channels.

Enumerator
ADC0 

ADC channel 0 on PF0.

ADC1 

ADC channel 1 on PF1.

ADC2 

ADC channel 2 on PF2.

ADC3 

ADC channel 3 on PF3.

ADC4 

ADC channel 4 on PF4.

ADC5 

ADC channel 5 on PF5.

ADC6 

ADC channel 6 on PF6.

ADC7 

ADC channel 7 on PF7.

ADC8 

ADC channel 8 on PK0.

ADC9 

ADC channel 9 on PK1.

ADC10 

ADC channel 10 on PK2.

ADC11 

ADC channel 11 on PK3.

ADC12 

ADC channel 12 on PK4.

ADC13 

ADC channel 13 on PK5.

ADC14 

ADC channel 14 on PK6.

ADC15 

ADC channel 15 on PK7.

◆ InputPin

enum class atmega2560::adc::InputPin : uint8_t
strong

ADC logical GPIO pin.

Enumerator
ADC0 

ADC0 logical input.

ADC1 

ADC1 logical input.

ADC2 

ADC2 logical input.

ADC3 

ADC3 logical input.

ADC4 

ADC4 logical input.

ADC5 

ADC5 logical input.

ADC6 

ADC6 logical input.

ADC7 

ADC7 logical input.

ADC8 

ADC8 logical input.

ADC9 

ADC9 logical input.

ADC10 

ADC10 logical input.

ADC11 

ADC11 logical input.

ADC12 

ADC12 logical input.

ADC13 

ADC13 logical input.

ADC14 

ADC14 logical input.

ADC15 

ADC15 logical input.

◆ MuxSelection

enum class atmega2560::adc::MuxSelection : uint8_t
strong

Complete valid MUX5:0 selections from datasheet Table 26-4.

Enumerator
SingleEndedADC0 

Single-ended ADC0.

SingleEndedADC1 

Single-ended ADC1.

SingleEndedADC2 

Single-ended ADC2.

SingleEndedADC3 

Single-ended ADC3.

SingleEndedADC4 

Single-ended ADC4.

SingleEndedADC5 

Single-ended ADC5.

SingleEndedADC6 

Single-ended ADC6.

SingleEndedADC7 

Single-ended ADC7.

DifferentialADC0_ADC0_Gain10 

ADC0 positive, ADC0 negative, gain 10x.

DifferentialADC1_ADC0_Gain10 

ADC1 positive, ADC0 negative, gain 10x.

DifferentialADC0_ADC0_Gain200 

ADC0 positive, ADC0 negative, gain 200x.

DifferentialADC1_ADC0_Gain200 

ADC1 positive, ADC0 negative, gain 200x.

DifferentialADC2_ADC2_Gain10 

ADC2 positive, ADC2 negative, gain 10x.

DifferentialADC3_ADC2_Gain10 

ADC3 positive, ADC2 negative, gain 10x.

DifferentialADC2_ADC2_Gain200 

ADC2 positive, ADC2 negative, gain 200x.

DifferentialADC3_ADC2_Gain200 

ADC3 positive, ADC2 negative, gain 200x.

DifferentialADC0_ADC1_Gain1 

ADC0 positive, ADC1 negative, gain 1x.

DifferentialADC1_ADC1_Gain1 

ADC1 positive, ADC1 negative, gain 1x.

DifferentialADC2_ADC1_Gain1 

ADC2 positive, ADC1 negative, gain 1x.

DifferentialADC3_ADC1_Gain1 

ADC3 positive, ADC1 negative, gain 1x.

DifferentialADC4_ADC1_Gain1 

ADC4 positive, ADC1 negative, gain 1x.

DifferentialADC5_ADC1_Gain1 

ADC5 positive, ADC1 negative, gain 1x.

DifferentialADC6_ADC1_Gain1 

ADC6 positive, ADC1 negative, gain 1x.

DifferentialADC7_ADC1_Gain1 

ADC7 positive, ADC1 negative, gain 1x.

DifferentialADC0_ADC2_Gain1 

ADC0 positive, ADC2 negative, gain 1x.

DifferentialADC1_ADC2_Gain1 

ADC1 positive, ADC2 negative, gain 1x.

DifferentialADC2_ADC2_Gain1 

ADC2 positive, ADC2 negative, gain 1x.

DifferentialADC3_ADC2_Gain1 

ADC3 positive, ADC2 negative, gain 1x.

DifferentialADC4_ADC2_Gain1 

ADC4 positive, ADC2 negative, gain 1x.

DifferentialADC5_ADC2_Gain1 

ADC5 positive, ADC2 negative, gain 1x.

InternalBandgap1V1 

Internal 1.1 V bandgap channel.

Ground 

Ground channel.

SingleEndedADC8 

Single-ended ADC8.

SingleEndedADC9 

Single-ended ADC9.

SingleEndedADC10 

Single-ended ADC10.

SingleEndedADC11 

Single-ended ADC11.

SingleEndedADC12 

Single-ended ADC12.

SingleEndedADC13 

Single-ended ADC13.

SingleEndedADC14 

Single-ended ADC14.

SingleEndedADC15 

Single-ended ADC15.

DifferentialADC8_ADC8_Gain10 

ADC8 positive, ADC8 negative, gain 10x.

DifferentialADC9_ADC8_Gain10 

ADC9 positive, ADC8 negative, gain 10x.

DifferentialADC8_ADC8_Gain200 

ADC8 positive, ADC8 negative, gain 200x.

DifferentialADC9_ADC8_Gain200 

ADC9 positive, ADC8 negative, gain 200x.

DifferentialADC10_ADC10_Gain10 

ADC10 positive, ADC10 negative, gain 10x.

DifferentialADC11_ADC10_Gain10 

ADC11 positive, ADC10 negative, gain 10x.

DifferentialADC10_ADC10_Gain200 

ADC10 positive, ADC10 negative, gain 200x.

DifferentialADC11_ADC10_Gain200 

ADC11 positive, ADC10 negative, gain 200x.

DifferentialADC8_ADC9_Gain1 

ADC8 positive, ADC9 negative, gain 1x.

DifferentialADC9_ADC9_Gain1 

ADC9 positive, ADC9 negative, gain 1x.

DifferentialADC10_ADC9_Gain1 

ADC10 positive, ADC9 negative, gain 1x.

DifferentialADC11_ADC9_Gain1 

ADC11 positive, ADC9 negative, gain 1x.

DifferentialADC12_ADC9_Gain1 

ADC12 positive, ADC9 negative, gain 1x.

DifferentialADC13_ADC9_Gain1 

ADC13 positive, ADC9 negative, gain 1x.

DifferentialADC14_ADC9_Gain1 

ADC14 positive, ADC9 negative, gain 1x.

DifferentialADC15_ADC9_Gain1 

ADC15 positive, ADC9 negative, gain 1x.

DifferentialADC8_ADC10_Gain1 

ADC8 positive, ADC10 negative, gain 1x.

DifferentialADC9_ADC10_Gain1 

ADC9 positive, ADC10 negative, gain 1x.

DifferentialADC10_ADC10_Gain1 

ADC10 positive, ADC10 negative, gain 1x.

DifferentialADC11_ADC10_Gain1 

ADC11 positive, ADC10 negative, gain 1x.

DifferentialADC12_ADC10_Gain1 

ADC12 positive, ADC10 negative, gain 1x.

DifferentialADC13_ADC10_Gain1 

ADC13 positive, ADC10 negative, gain 1x.

◆ Prescaler

enum class atmega2560::adc::Prescaler : uint16_t
strong

ADC prescalers.

Enumerator
Divide2 

ADC division 2.

Divide4 

ADC division 4.

Divide8 

ADC division 8.

Divide16 

ADC division 16.

Divide32 

ADC division 32.

Divide64 

ADC division 64.

Divide128 

ADC division 128.

◆ Reference

enum class atmega2560::adc::Reference : uint8_t
strong

Reference voltage selection encodings.

Enumerator
AREF 

External reference.

AVCC 

Analog supply.

Internal1V1 

Internal nominal 1.1 V.

Internal2V56 

Internal nominal 2.56 V.

◆ TriggerSource

enum class atmega2560::adc::TriggerSource : uint8_t
strong

ADC trigger sources.

Enumerator
FreeRunning 

Free running conversions.

AnalogComparator 

Comparator event.

ExternalInterrupt0 

INT0 trigger.

Timer0CompareMatchA 

Timer 0 compare A.

Timer0Overflow 

Timer 0 overflow.

Timer1CompareMatchB 

Timer 1 compare B.

Timer1Overflow 

Timer 1 overflow.

Timer1CaptureEvent 

Timer 1 capture.