> > That is amazing, but I cleared the CVRCON register in my PORTA > > initializing and the problem doesn=B4t happen more >=20 > If CVRCON,CVREN and CVRCON,CVROE are set then you > might expect to see CVref on RA2 >=20 > The POR state of CVRCON is 00000000. I don't recall ever having > a problem with it, so can't explain why your CVRCON is not clear > after a power-up or reset >=20 If it suddenly works when you add code that should not matter (as in this c= ase)=20 I would suspect that it is the actual moving of the rest of the code that=20 helped, which means that you still have a problem (it just doesn't show its= elf=20 like it did before).=20 Try to add nop instructions instead of the code you added (to get the rest = of=20 the code in the same place as it is now) and see if it still works. If it still works check for things that could make the code "derail" - Stac= k=20 overflow, jump instead of call to subroutines, missing ret in subroutine,=20 calculated goto jumping wrong, page switching (if it applies to the micro y= ou=20 are using), missing to clear the WDT or even combinations of the above. It can also mean that you have timer interrupts (or other interrupts for th= at=20 matter) that occurs at different places in the code than before and if the= =20 interrupt code doesn't play nicely with the rest of the code, this is what = you=20 could see. By not playing nicely I mean not saving and restoring vital=20 registers/bits such as status register and bank and page bits, accessing th= e=20 same variables in both non interrupt and interrupt code in a non interrupt = safe=20 way, calling the same routines from the interrupt code as from non interrup= t=20 code using local variables at the same register addresses and so on... /Ruben =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .