Avr multiple ADC and PWM channels
The code is fine. The problem was that I was only testing the ADC on one pin and floating the other two. I was expecting only the one I was testing to work, but apparently there's a lot of crosstalk between ADC pins if they're floating. Also, a lot of noise, even with capacitors on ARef and AVcc. Thanks and sorry for posting without fully testing before.