OK, I have written a few basic programs in MPLABX C18 for both 18f4550 and 18f46k20. Eventually got them to compile and test/debug correctly and run on the PIC. After I choose, "make and program device" It works but I can no longer run debug or re-program the chip. Always says the device doesn't match, etc. Here is what the output window says:
Connecting to MPLAB ICD 3... Firmware Suite Version.....01.28.07 Firmware type..............PIC18F
Target detected Device ID Revision = 7
The following memory area(s) will be programmed: program memory: start address = 0x0, end address = 0x1ff configuration memory
Programming... program memory Address: c Expected Value: 6a Received Value: 36 Failed to program device
Any ideas?
Thanks