ADC

Hi everybody. Im asking for help with Analog to Digital Converter. Im trying to work with registers and I`m really stuck.
I want to get an analog value from ADC0(A0 as I suppose) once a second. Here is simple code:

byte b;
void setup()
{
  Serial.begin(9600);
  ADMUX = 0b11100000; //configure Vref=1.1V, left adjust, ADC0
  ADCSRA = 0b10001000; //enable ADC, enable interrupt
}

void loop()
{
  ADCSRA |=1<<6; //start ADC
  delay(1000); //wait for a second
  Serial.println(b); //print value
}

ISR(ADC_vect)
{
  b = ADCH; //get a value from ADCH Register
}

And all Ive got is a value "255", dont matter what connected to ADC0.
Can somebody explain me what I`m doing wrong?

You've set the prescaler to a ludicrous value, the bottom 3 bits of ADCSRA should probably be 111 or 110, not 000. 000 means 8MHz ADC clock which is way above the recommended max of 200kHz (assuming system clock freq of 16MHz)

byte b should be declared volatile.

Thank you! It works!

Volatile means you suggest to declare "b" localy in function?

Volatile means you suggest to declare "b" localy in function?

No. volatile is a keyword. Look it up.