I am using an ATTINY88 for a project that requires to turn on an LED. Right now I am using pin PA1(ADC7/PCINT25). I noted, however, that when the pin is ON, I get about half the voltage that is connected to Vcc. I checked the voltage in other pins and they are close to Vcc. Will anyone know, what could be the reason for this?

I figure this pin has an internal resistor enable, but I am not certain.

  • Do you have a resistor in series with the LED?
    – Nick Gammon
    Commented Aug 26, 2016 at 3:16
  • I disconnected everything from the pin and I still get half the Voltage in Vcc when that pin is HIGH. In fact, all the pins on that side of the chip give half the voltage when they are on, while other pins give voltage near Vcc. I think those pins on that side of the chip have a resistor enable???
    – Camilo
    Commented Aug 26, 2016 at 3:22
  • this behaviour might happen if you have PA1 set as input and pull up resistor enabled. Check the datasheet for Port A sub-section. It defines that it will source current when enabled.
    – ammar.cma
    Commented Aug 26, 2016 at 3:38
  • is there a way to disable such resistor? I have that pin set as OUTPUT
    – Camilo
    Commented Aug 26, 2016 at 4:09

1 Answer 1


You should connect the AVCC pin to VCC. From the datasheet (emphasis mine):

AVCC is the supply voltage pin for the A/D converter and a selection of I/O pins. This pin should be externally connected to VCC even if the ADC is not used. [...]

The following pins receive their supply voltage from AVCC: PC7, PC[5:0] and (in 32-lead pack- ages) PA[1:0]. All other I/O pins take their supply voltage from VCC.

  • That sounds like a really bizarre design choice to me... reminds me why I use PIC and not Atmel chips ;)
    – Majenko
    Commented Aug 26, 2016 at 9:29
  • @Majenko It is little bit bizare, but connecting AVcc to Vcc is stated in every datasheet for every AVR with AVcc pin. And yet it's common rookie mistake.
    – KIIV
    Commented Aug 26, 2016 at 13:15
  • It probably makes internal wiring in the chip simpler, and possibly reduces noise.
    – Nick Gammon
    Commented Aug 26, 2016 at 17:02
  • do you know why is this needed (connecting AVcc to Vcc)?. My circuit works just fine without that connection and it includes several AnalogReads....also, I wonder if it will increase battery consumption? I will test this.
    – Camilo
    Commented Aug 26, 2016 at 18:44
  • 1
    Yes, but those are the analog (ADC) pins anyway (of course you can use them for digital if you want). Having the ADC pins have two power sources could be complex (one for digital work, one for analog work). So if you stick to using the "digital-only" side for digital switching and the analog-side for analog reading, the two power supplies now keep them separate, rather than running an internal wire, with its digital noise from digital switching, from one side of the chip to the other. So I wouldn't call it bizarre. It sounds quite sensible to me.
    – Nick Gammon
    Commented Aug 26, 2016 at 22:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.