picstart plus icsp adapter
Hello Freddie Chopin, in my circuit the VCC and GND from the ICSP header is connected straight into the VCC and GND planes, so all VCC and GND pins on the PIC are being supplied.
I've noticed that if I disconnect the VCC from the ICSP, while powering the board from USB, I do not get a time-out any more. (i.e. I only connect the GND/MCLR/RB6/RB7 pins of the PICSTART Plus to the circuit, and so VCC is supplied from the USB).
However, when I attempt to read the program memory at the MPLAB / PICSTART says:
"Device is data protected! Data memory may be invalid.
Device is code protected! Program memory may be invalid."
If I attempt to Erase the chip (Programmer -> Erase Flash Device) it tells me "Erase operation is successful." However, reading it again gives the same error.
If I now attempt to write anything to the device (Right click anywhere in Program Memory and Fill Memory with random data) then write this, MPLAB / PICSTART says:
Code:
PICSTART Program\Verify Report
10-Jan-2008, 20:38:45
Device Type: PIC18F4550
Address Range 0-7fff
Program Memory Errors
Address Good Bad
0000: CAC9 0000
0002: D648 0000
0004: 1555 0000
0006: 1DBB 0000
0008: 61F5 0000
000A: AA80 0000
000C: F675 0000
000E: E5F8 0000
0010: A555 0000
0012: 45B5 0000
0014: 98D6 0000
0016: 8F2E 0000
0018: 5455 0000
001A: 03B7 0000
001C: 5FD8 0000
001E: 88B0 0000
0020: D1E7 0000
0022: 9FFC 0000
0024: 2B9D 0000
0026: C4B5 0000
0028: BAFE 0000
002A: 001D 0000
002C: 778B 0000
002E: CAD8 0000
0030: 0D14 0000
0032: 0E59 0000
0034: 88CE 0000
0036: DA9B 0000
0038: 5CA5 0000
003A: 2411 0000
003C: ACD3 0000
003E: 1DDF 0000
Any additional errors are not displayed.
Anyone have any further suggestions?
Added after 2 hours 23 minutes:
Thank you everyone for your suggestions. I have solved the issue in the following way:
1. Remove the VCC (power pin) from the ICSP cable.
2. Let the USB provide VCC to the circuit board (in my case).
3. Create a new ICSP cable as follows:
Code:
From the PICSTART Plus (position corresponding to DIP40 18F4550) -> ICSP Header
Pin 1 (MCLR) -> Pin 1 (MCLR)
Pin 31 (VSS) -> Pin 3 (GND)
Pin 39 (RB6) -> Pin 5 (PGC)
Pin 40 (RB7) -> Pin 4 (PGD)
You can also connect Pin 32 (VDD) -> Pin 2 (VCC) if your board doesn't consume too much power, but this caused some of my problems.
4. Test Read/Write/Verify/Fill and so on.
Thanks everyone for the help, this has taken me way too long to figure out. Now I can finally get on with my work.