ADC in Avr
ADC in Avr
ADCH
ADCL
ADCSRA
ADMUX
SPIOR
ADCH & ADCL (ADC Data Registers)
REFS1 & REFS0: Selects the reference voltage for ADC conversion
ADLAR: Adjusts the ADC result left or right (Left = 1, Right = 0)
Left-adjusted result means the high bits are stored in ADCH.
MUX[4:0]: Selects the input channel (ADC0 to ADC7).
SFIOR (Special Function IO Register)