icsp programming pgd2
Now, I change to add supply from the board 3.3V. The status all correct now, The device can be detected now:
"Setting Vdd source to target
Target Device PIC24HJ64GP506 found, revision = Rev 0x3002
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 Ready "
But When I eras the part the error comes:
"Erasing Target Device... ...Erase Succeeded MPLAB ICD 2 Ready
Blank Checking... ICD0161: Verify failed (MemType = Program, Address = 0x20, Expected Val = 0xFFFFFF, Val Read = 0x0) ...Device not blank MPLAB ICD 2 Ready "
When I program the target, it also shows error:
"Programming Target... ...Erasing Part ...Programming Program Memory (0x0 - 0x87F) Verifying... ...Program Memory ICD0161: Verify failed (MemType = Program, Address = 0x80, Expected Val = 0x810, Val Read = 0xFFFFFF) ICD0275: Programming failed. MPLAB ICD 2 Ready "
I tried other ways, the program process seems always fail at address 0x80 and onwards;
One more thing, at the secure Segment option in the ICD2 Setting page, should I select "Full chip programming" or " Segement Programming" + ...
did anyone program PIC24HJ before? I attached my firmware code for reference.
Thanks !