depending wich pic you used before. Be sure that the new one don't have any analog or else Multiplexed stuff that the old have'nt. Double check the oscillator and fuse setting.

If yuo can post a part of your code... even if it's just the top, we can see if there's something bad with.