Hi,
Two questions, only one needs answering:
1) Why on earth do you use the datasheet for the 16F628A when you're using the 16F877A?
2) If you actually ARE using the 16F628A why on earth do you post a schematic showing that you're using a 16F877A?

I'm sorry but you're not really making it easy for anyone to help you.

/Henrik.