I tried to connect the MCLR stright to the +5V. Didnt help. Will try with RCR.
887 use internal OSC while the 877A use an external.
The code works perfect on both devices when using the USB programmer to power up the circuit.
When I use the 7805 to power the 877A, it fails. 887 is running with the same 7805 with no problems.
I see that the program run, I see it print something every 1 second, It start to print 1,2 and then it print junk every 1 sec. Thats why I think the LCD get some noise. I tried with R-C to the ground, but it doesn't help.