Henrik,

I have connected a 1k resistor between pin 7 and pin 11.Also, connected pin 7 to pin 20 (AVDD AND VDD pins) and pin 8 to pin 19 (AVSS and VSS pins).Then when I do a blank check I get:
"
Device is NOT blank:
Program Memory
Configuration Bits
IDs
Data Memory
"

Then when I do a read I get:

"
Device is data protected! Data memory may be invalid.

Device is code protected! Program memory may be invalid.
"

I looked at the thread you asked me to take a look at and they show how to do ICSP.I have done that but still I have not solved the problem.

Did you use MPLAB IDE version 8.10 and picstart firmware version 04.50.09?

It seems that for some reason I cannot erase my pic18f2331???????

Please let me know.

Thanks