I've not used any pics for a long time but needed a simple project doing. I picked an 18F2620 as the target device. Hooked it up as normal to my pickit 4 and it won't program. After trying two boards and 4 chips, rechecking the wiring umpteen times I'm at a loss.
The project consists of the config bits and this,
When I try to compile it (the first time only) I get this,
As can be seen above, the first time it interrogates the chip it gets an id from the Pic18F2620 rev 6 but the second time it tries to fetch the id it fails.
If I then try to compile again, I get this,
I tried connecting my pickit 4 to a board containing a 16F18446 (last project I worked on) and that compiles fine.
In all cases the pickit is set to power the target and the target is just the chip.
Has anyone ANY idea what could be the problem?
Mike.
Edit, after following all the recommendations on this page. I finally got it working by moving it to a dedicated USB3 port (not via a hub) and it now compiles!!! Do 18 series take more power than 16 series?
Edit2 And now it's doing the same on the dedicated port. I give up.
The project consists of the config bits and this,
Code:
#include <xc.h>
void main(void){
while (1){
}
}
Code:
Connecting to MPLAB PICkit 4...
Currently loaded versions:
Application version............00.06.87
Boot version...................01.00.00
Script version.................00.04.48
Script build number............7acb7c9d66
Tool pack version .............1.8.1120
PICkit 4 is supplying power to the target (4.30 volts).
Target device PIC18F2620 found.
Device Revision Id = 0x6
Calculating memory ranges for operation...
Erasing...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3f
program memory: start address = 0xfd00, end address = 0xfd3f
configuration memory
Script GetVersionDE failed with status Type = runScript, Script name = GetVersionDE, Status = 0xa00
.
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.
If I then try to compile again, I get this,
Code:
*****************************************************
Calculating memory ranges for operation...
Erasing...
The following memory area(s) will be programmed:
program memory: start address = 0x0, end address = 0x3f
program memory: start address = 0xfd00, end address = 0xfd3f
configuration memory
Script GetVersionDE failed with status Type = runScript, Script name = GetVersionDE, Status = 0xa00
.
The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding. The most common causes for this failure are oscillator and/or PGC/PGD settings.
In all cases the pickit is set to power the target and the target is just the chip.
Has anyone ANY idea what could be the problem?
Mike.
Edit, after following all the recommendations on this page. I finally got it working by moving it to a dedicated USB3 port (not via a hub) and it now compiles!!! Do 18 series take more power than 16 series?
Edit2 And now it's doing the same on the dedicated port. I give up.
Last edited: