[sdiy] destroying flash memory cell on a PIC
Brian Willoughby
brianw at audiobanshee.com
Sat Mar 20 00:11:52 CET 2021
I forgot to mention (in my previous reply) that Microchip sell a professional programmer that precisely controls the supply voltage during programming and verification to ensure that the data can be read back reliably under all conditions. I think this programmer costs around $300. My client wasn't interested in paying any more than the $30 for the PICkit, so they ended up shipping out customer units that weren't guaranteed to the same specs.
Perhaps you have an issue with your power supply - either during programming, or during read-back - that affects the Flash. I don't know what algorithm Microchip uses in their programmer, but it has the ability to vary the supply voltage during program and verify.
I talked to Microchip just long enough to be convinced that this programmer was a good idea for any real manufacturing production, but I never purchased one myself. That was at least twelve years ago.
Brian
On Mar 17, 2021, at 03:55, Roman Sowa wrote:
> Hi,
> I was recently playing with PIC18 self-write and encountered strange problem. I can't be sure if it was because of my multiple write attempts (not that many of them) or it is extremely bad luck, but the microcontroller in question (PIC18F46K22) shows stange fault. About 20 of flash memory bytes are showing 00 even if that range was not programmed. It is FF after bulk erase, but after programming even several kilobytes below, they read as 00.
> There's a pattern - they are all on 10-bit boundary, so it's address 400, 800, C00 and so on till FC00. To look even more strange, it's not all, but randomly few bytes fitting that pattern work OK.
> It happens either if I program it as self-write, or if using ICD3.
>
> Have anyone ever encountered this problem?
>
> After thousands of PICs used so far I have never encountered flash error. OTOH, I have never used self-write before, but despite looking like obvious coincidence I can't see a reason why self-write would damage a memory cell, or address decoder. Chip errata does not mention anything about memory precautions.
>
> Maybe I'm doing this too fast? The 64-byte page write is initiated just a couple of us after page erase is finished. This shouldn't be a problem but maybe worth trying to put 2-3ms delay.
> Thanks for your help!
>
> Roman
More information about the Synth-diy
mailing list