First off, thank you very much to all who responded, I really appreciate it. I probably should have included some more details in my original post. I am indeed using the HiTech PICC compiler, and my circuit does have capacitors coupled between the individual a/d inputs and ground. As far as my delay routines, they were taken from an example in Myke Predko's book, 123 Pic Microcontroller Experiments for the Evil Genius. I will take a look at the example delay routines included with the compiler. An interrupt approach ulimately solved my problem, which is something I wouldn't have readily considered as a solution, so many thanks for that advice. I am still a little confused as to why the interrupt approach worked as opposed to a modifed polling type approach simmilar to what I tried first. No matter how much time I allowed after switching a/d channels, subsequent reads always produced the same values, regardless of the inputs changing. Anyway, I have attached the latest (working!) code in hopes that it might help someone else someday. Thanks again, Jason /** ThermInt.c Jason Wambach Use interrupt based ADC to read temperature from thermistor and set point from pot **/ #include #include __CONFIG(FCMDIS & IESODIS & BORDIS & UNPROTECT & MCLREN & PWRTEN & WDTDIS & INTIO); int i,j,k,n,b,sw; unsigned int a; double Temp; // 1234567890123456 const char TopMessage[] = "Curr Temp: "; const char BotMessage[] = "Set Temp: "; #define E RC4 #define RS RC5 const int Twentyms = 1250; const int Fivems = 300; const int TwoHundredus = 10; //4bit LCD Write Operation //Tell the compiler that this method cannot be called from 2 locations //at the same time #pragma interrupt_level 1 LCDWrite(int LCDData, int RSValue) { PORTC = (LCDData >> 4) & 0x0F; RS = RSValue; E = 1; E = 0; PORTC = LCDData & 0x0F; RS = RSValue; E = 1; E = 0; if ((0 == (LCDData & 0xFC)) && (0 == RSValue)) { n = Fivems; } else { n = TwoHundredus; } for (k = 0; k < n; k++); } //Write formatted decimal to LCD TempDec(int i) { int t; if (i >= 100) { t = i / 100; LCDWrite('0' + t, 1); i = i % 100; } else { LCDWrite(' ', 1); } if (i >= 10) { t = i / 10; LCDWrite('0' + t, 1); i = i % 10; } else { LCDWrite('0', 1); } LCDWrite('0' + i, 1); } void updateLCD() { LCDWrite(0b00000001,0); //clear lcd for (i = 0; i< TopMessage[i] != 0; i++) { LCDWrite(TopMessage[i],1); //LCDWrite('0' + i, 1); } TempDec(a); //Format and display LCDWrite(0xDF, 1); //Degree symbol LCDWrite('F', 1); LCDWrite(0b11000000,0); //Move to 2nd line //2nd Line for (i = 0; BotMessage[i] != 0; i++) { LCDWrite(BotMessage[i],1); } TempDec(b); LCDWrite(0xDF, 1); LCDWrite('F', 1); } #pragma interrupt_level 1 void interrupt adint(void) { if (sw) { //Thermo a = (ADRESH << 8) + ADRESL; //Temperature Calculation Temp = (1023.0 / (double)a) - 1.0; Temp = log(Temp); Temp = 32.5 - (Temp / 0.019129); Temp = (9f/5f)*Temp+32; a = (int)Temp; //set for pot read ADCON0 = 0b00001001; //select RA2, Left justified result updateLCD(); } else { b = ADRESH; //only care about 8 most significant bits b *= 30; b /= 255; b += 60; //Want b in the range of 60-90 //Control an led on RA4, eventually control a relay connected to heater if (b <= a) { RA4 = 0; } else { RA4 = 1; } //setup for temp read ADCON0 = 0b10000001; //Selected RA0, Right justified } sw = sw ^ 1; //Flip Flop between AD Channels ADIF = 0; //Reset AD Interrupt Flag GODONE = 1; //Start AD Again } main() { PORTC = 0; CMCON0 = 7; TRISC = 0; TRISA0 = 1; TRISA2 = 1; TRISA4 = 0; ANSEL = 0b00000101; ADCON0 = 0b10000001; ADCON1 = 0b00010000; //Clock Fosc/8 or 2uS //LCD Initialization j = Twentyms; for (i = 0; i < j; i++); PORTC = 3; E = 1; E = 0; //Reset j = Fivems; for (i = 0; i < j; i++); E = 1; E = 0; //Reset 2 j = TwoHundredus; for (i = 0; i < j; i++); E = 1; E = 0; //Reset 3 j = TwoHundredus; for (i = 0; i < j; i++); PORTC = 2; E = 1; E = 0; j = TwoHundredus; for (i = 0; i < j; i++); //Only called before interrupts are enabled LCDWrite(0b00101000,0); LCDWrite(0b00000001,0); //clear lcd LCDWrite(0b00000110,0); LCDWrite(0b00001110,0); a = 0; b = 0; sw = 1; //Enable interrupts PEIE = 1; GIE = 1; ADIF = 0; ADIE = 1; GODONE = 1; //Start AD while (1 == 1); } -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist