Bit 5 – ADLAR: ADC Left Adjust Result
The ADLAR bit affects the presentation of the ADC conversion result in the ADC Data Register.
Write one to ADLAR to left adjust the result. Otherwise, the result is right adjusted. Changing
the ADLAR bit will affect the ADC Data Register immediately, regardless of any ongoing
conversions. For a complete description of this bit, see "ADCL and ADCH – The ADC Data
Register" in the section 7.2.5.
Bits 4:0 – MUX4:0: Analog Channel and Gain Selection Bits
The value of these bits selects which combination of analog inputs are connected to the ADC.
For more details see Table 7.3. If these bits are changed during a conversion, the change will not
go in effect until this conversion is complete (ADIF in ADCSRA is set)
MUX5:0
ADC pin
000000
PF0/ADC0
000001
PF1/ADC1
000010
PF2/ADC2
000011
PF3/ADC3
000100
PF4/ADC4/TCK
000101
PF5(ADC5/TMS)
000110
PF6/(ADC6/TD0)
000111
PF7(ADC7/TDI)
100000
PK0/ADC8/PCINT16
100001
PK1/ADC9/PCINT17
100010
PK2/ADC10/PCINT18
100011
PK3/ADC11/PCINT19
100100
PK4/ADC12/PCINT20
100101
PK5/ADC13/PCINT21
100110
PK6/ADC14/PCINT22
100111
PK7/ADC15/PCINT23
***** For using Analog IR proximity (1, 2, 3 and 4) sensors short the jumper J2. To use JTAG
via expansion slot of the microcontroller socket remove these jumpers.
Note:
Table 7.3 is a simplified version of the table 26.4 from the ATMEGA2560 datasheet customized
to the Fire Bird V ATMEGA2560 robot
MUX4:1 are located inside ADMUX register. MUX5 is located in the ADCSRB register.
© NEX Robotics Pvt. Ltd. and ERTS Lab IIT Bombay, INDIA
Pin function
ADC input for battery voltage monitoring
ADC input for white line sensor 3
ADC input for white line sensor 2
ADC input for white line sensor 1
ADC input for IR proximity analog sensor 1*****
ADC input for IR proximity analog sensor 2*****
ADC input for IR proximity analog sensor 3*****
ADC input for IR proximity analog sensor 4*****
ADC input for IR proximity analog sensor 5
ADC input for Sharp IR range sensor 1
ADC input for Sharp IR range sensor 2
ADC input for Sharp IR range sensor 3
ADC input for Sharp IR range sensor 4
ADC input for Sharp IR range sensor 5
ADC Input For Servo Pod 1
ADC Input For Servo Pod 2
Table 7.3 Input channel selection and functions
Fire Bird V ATMEGA2560 Software Manual
Pin status
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
Input (Floating)
98
Need help?
Do you have a question about the Fire Bird V ATMEGA2560 and is the answer not in the manual?