hi,
try to make it in one call like
if the chip freeze again, post more code ....
hth a bit
btw i dont understand your hex config ...see DS39626E-page 224 datasheet of the 18f2620...
bit 7-6 Unimplemented: Read as ‘0’
bit 5 VCFG1: Voltage Reference Configuration bit (VREF- source)
1 = VREF- (AN2)
0 = VSS
bit 4 VCFG0: Voltage Reference Configuration bit (VREF+ source)
1 = VREF+ (AN3)
0 = VDD
bit 3-0 PCFG3:PCFG0: A/D Port Configuration Control bits:
1011 D D D D D D D D D A A A A // an0 to an3 analog
0x0E = 1110 and that is only an0 as analog ...
and the other cal with 0x82 = 0b10000010 ... the first 1 is not possible because read as 0 and the 4 lower bit config all analog channel .....