48
ATtiny26(L)
1477G–AVR–03/05
MCU Control Register –
MCUCR
The MCU Control Register contains control bits for general MCU functions.
• Bit 6 – PUD: Pull-up Disable
When this bit is set (one), the pull-ups in the I/O ports are disabled even if the DDxn and
PORTxn Registers are configured to enable the pull-ups ({DDxn, PORTxn} = 0b01). See
“Configuring the Pin” on page 42 for more details about this feature.
Alternate Functions of Port A
Port A has an alternate functions as analog inputs for the ADC and Analog Comparator
and pin change interrupt as shown in Table 23. If some Port A pins are configured as
outputs, it is essential that these do not switch when a conversion is in progress. This
might corrupt the result of the conversion. The ADC is described in “Analog to Digital
Converter” on page 94. Analog Comparator is described in “Analog Comparator” on
page 91. Pin change interrupt triggers on pins PA7, PA6 and PA3 if interrupt is enabled
and it is not masked by the alternate functions even if the pin is configured as an output.
See details from “Pin Change Interrupt” on page 62.
Table 24 and Table 25 relates the alternate functions of Port A to the overriding signals
shown in Figure 35 on page 46. Thera are changes on PA7, PA6, and PA3 digital
inputs. PA3 output and pullup driver are also overridden.
• ADC6/AIN1 Port – A, Bit 7
AIN1: Analog Comparator Negative input and ADC6: ADC input channel 6
.
Configure
the port pin as input with the internal pull-up switched off to avoid the digital port function
from interfering with the function of the analog comparator or analog to digital converter.
PCINT1: Pin Change Interrupt 1 pin. Pin change interrupt is enabled on pin when global
interrupt is enabled, pin change interrupt is enabled and the alternate function do not
mask the interrupt. The masking alternate function is the Analog Comparator. Digital
input is enabled on pin PA7 also in SLEEP modes, if the pin change interrupt is enabled
and not masked by the alternate function.
• ADC5/AIN0 Port – A, Bit 6
Bit
7
6
5
4
3
2
1
0
–
PUD
SE
SM1
SM0
–
ISC01
ISC00
MCUCR
Read/Write
R
R/W
R/W
R/W
R/W
R
R/W
R/W
Initial Value
0
0
0
0
0
0
0
0
Table 23. Port A Pins Alternate Functions
Port Pin
Alternate Function
PA7
ADC6 (ADC input channel 6)
AIN1 (Analog Comparator negative input)
PCINT1 (Pin Change Interrupt 1)
PA6
ADC5 (ADC input channel 5)
AIN0 (Analog Comparator positive input)
PCINT1 (Pin Change Interrupt 1)
PA5
ADC4 (ADC input channel 4)
PA4
ADC3 (ADC input channel 3)
PA3
AREF (ADC external reference)
PCINT1 (Pin Change Interrupt 1)
PA2
ADC2 (ADC input channel 2)
PA1
ADC1 (ADC input channel 1)
PA0
ADC0 (ADC input channel 0)