The chips or the programmer could be bad.
If you have a 16F877 from another batch then try programming that. If it programs properly then the chips are either bad or marginal for use with that particular programmer.
Perhaps you have another programmer you can try or borrow one from a friend or send one of the chips to a friend with another programmer to try.
A while back I bought some OTP PROMs from EBAY. My universal programmer (TL866) supported that particular chip but it didn't work so I thought they were fakes. But I asked on a forum if someone with another programmer would be kind enough to try and program the chip for me. It worked fine.
/Henrik.



Bookmarks