USB programmer problem 18LF4620
I have some data loggers using the 18LF4620 storing data in multiple M25P64 fllash memory chips. In an attempt to recover data from some data loggers where the battery went flat and the processor code memory has been largely erased, I have stitched some wires to the on-board 18LF4620-PT, 44 pin TQFP package, to allow my MeLabs USB programmer to program the chip via ICSP.
I am running the latest 4.22 beta code for the USB programmer. I can read the processor main memory, the configuration data and the data EEROM. I can see that the EEROM data is correct so I am definitely reading the chip BUT I cannot program the chip. I have the 18F4620 as the selected device in the programmer selection window.
Every time I try to program I get the message 'Target device does not match selected device' yet the chip is a genuine 18LF4620 and they have programmed before.
When I turn off the target device checking it then fails with an 'Erase failed' message. If I turn off the erase before programming it prompts for 'device not blank - program anyway?' . I say yes to that then it looks like it is programming but comes up with many 'code verify' errors.
How come the USB programmer can read the PIC but not program it?
Cheers
Brian
Answers for Bruce and Ohararp
Sorry I did not answer your specific questions.
Bruce.
PGD, PGM and PGC are floating. LVP is turned OFF in the configuration fuses. The problem I am sure was voltage related where I suspect the USP programmer is looking for something near 5 volts and it was only getting 3.1-3.5 volts. The new cap from Vdd to Gnd in the USP programmer probably helped as well.
Oharap.
My code is currently set up for two M25P64 serial interface flash memory chips which receive data as 8 blocks x 256 bytes for a total of 2048 bytes per record. I (wastefully) time and date stamp every block and record housekeeping data like current AGC setting for diagnostic reasons. Spansion now have a 128 Mbit chip in a compatible footprint package so I might tweak my code for their M25FL128 chip after I have had time to read the fine print. These guys all claim 'industry compatible' and software compatible throughout their range but it aint really so. ST dropped their 'deep power down' command when going from 32 Mbits to 64 Mbits sending quiescent current from 2 uA up to about 100 uA and forcing me to add a PNP power switch to the memory that brings new complications during the power up/down sequencing of the interface pins to the PIC. At least the pinout remained the same. Spansion has a byte wide parallel load/dump feature which could speed data transfer but I can't fit the extra interface on my board. I am happy to send you the code but you will need to unravel all the 'junk DNA' that has been quietly festering over the half dozen hardware and software revisions on this project.
HTH
Brian