temperature sensor

Hello, I am trying to create a sketch that uses control registers to take two temperatures, one from a tmp36 and the other from the internal sensor on the arduino uno. The temperature from the tmp36 looks fine, but I am getting a negative number for the internal sensor reading. I figure it is a mistake i made in programming the registers. Any help would be greatly appreciated. Here is what I have:

volatile float temp = 0; //declare variable analogValue and assign value 0

void setup() {
Serial.begin(9600); //set baud rate to 9600

interrupts(); //enable interrupts*/
}
void loop() {
ADMUX = 0b11001000; //assign bits to register ADMUX
ADCSRA = 0b11001111; //assign bits to register ADCSRA
ADCSRB = 0b00000000; //assign bits to register ADCSRB
Serial.println(((temp / 1024.00 * 5.00) - 0.5) * 100.00);
ADCSRA |= (1<<ADSC);
delay(500);
ADMUX = 0b01000000; //assign bits to register ADMUX
ADCSRA = 0b11001111; //assign bits to register ADCSRA
ADCSRB = 0b00000000; //assign bits to register ADCSRB
//temp = ((analogRead(A0) / 1024.00 * 5.00) - 0.5) * 100;
Serial.println(((temp / 1024.00 * 5.00) - 0.5) * 100.00);
ADCSRA |= (1<<ADSC);
delay(500);
}
ISR(ADC_vect){
temp = ADC;
}

ADCtemp.ino (926 Bytes)

temp = ADC;

If ADC is a register and you read it directly, you need to make sure the format is converted correctly. You cannot just assign it to a floating point value.

Store it in an unsigned value and see if the values make sense to you.

A/D converters create whole numbers from 0 to 255 (8bit) 0 to 1024 (10 bit). You need to convert this into a floating point value, depending your physical parameters.

To compare the registers, it would have been nice if you had linked the data sheet. A few comments about the bits would help figuring out what you wanted and whether that is what your code does.

ADMUX = 0b11001000;

1 1 Internal 1.1V voltage reference with external capacitor at AREF pin

Do you have an external capacitor at AREF?

ADCSRA = 0b11001111; //assign bits to register ADCSRA
ADCSRB = 0b00000000; //assign bits to register ADCSRB

ADCSRA bit 6 starts a conversion. Why do you "configure" ADCSRB after you started the conversion? It might not have an effect anyways, but then it might.