Hi, Alain, thanks for replying. I tried the following as well from what I understood:
Code:
LoadTime:
		ADCON0=%10000100 : Pause 10
		ADCIN Poten,Time : Pause 10
;		Time=(Time/4)
		DEBUG "TIME=",DEC Time,10
Return


LoadLight:
		ADCON0=%10011100 : Pause 10
		ADCIN Ldr,Ambient : Pause 10
		DEBUG "AMBIENT=",DEC AMBIENT,10
		While Setswitch=1 : Pause 330 : wend
Return
No Luck. Where am I going wrong. I did this before but only with 1 channel. That worked out well. Now never tried anything with two channels, so can't say much.