at the end of your program, you should or finish by a STOP command or with an endless loop, unless your PIC may behave in a weird way.
Code:
Here:   GOTO Here
You may also need to check if ALL ADCs and comparators are disabled. Here i see 2 missing lines
Code:
ANSELH = 0
CM2CON0 = 0
And then what you drive and how, may help us to go deeper in our understanding.

HTH