Your configuration is incorrect. You are enabling the MCLR but you are not connecting it to VCC. Or you must disable it in Project Menu –> Edit Project. See the attached screenshot.
When you fix this error, your PIC will run but you will receive wrong characters on your USART terminal because:
- You must set the Virtual Terminal Baud rate the same as the baude rate you set in your code.
- The OSCCON=0x76; is incorrect for 8MHz, please read your PIC datasheet on page 28. It should be 0x66 or 0x67