I do not know the 24LC515 chip but post your PIC BASIC text file and I will look at it to see where your error might be.

I need to know what is your clock frequency and PIC Chip Type ( 16FXXX ).