o.k now it seems more a hardware problem than a software problem. be sure your supply line is neat an un-noisy. 10uF tantalum+0.1uF must be place close to your PIC... AS close as you can.
AND be sure your MCLR pin is tie to VCC via resistor.
Enable power-up timer can be great. Also as Melanie previously said it can be interesting to test the 'oscillator frequency is stable bit' before proceed to any of your initialisation process.
look at the a/d register setting(ADCON and others)... i'm sure that they're different from the PIC you used before.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks