May-be your clock speed is too high? PLL ON perhaps?
Try simulating your code in MPLAB. If this works OK, it's something in hardware. If not, you'll find the bug quickly.