Here's my code:
This code gives me numerous errors. Works fine if I want to return only one variable. Looked through a lot of example code and can't find anywhere, where they return 2 variables.
Rich (BB code):
unsigned char, unsigned char
get_temp() {
ADCON0 = 0b00000111; // Start ADC and Set Channel to AN1 (RA1)
while(ADGO)
continue; // wait for conversion complete
temph = ADRESH;
templ = ADRESL;
return ADRESH, ADRESL;
}