Contents | Recently Microchip have released a bunch
of new flash devices which have different programming to
the older devices. Currently we have 6 programming algorithms for Flash. More on VPP Risetime problems |
Recent parts have VDD-max=5.5V, and a slightly lower VPP than earlier ones. We have reports that they do not verify correctly at VDD=6V, so Microchip do mean it!
Also a sample 16F818 avalanched at VPP-max. It seems that 13V is the limit for the latest processes.
On older BEL dual PIC programmers, put a 100k resistor across the 10k immediately below the MC34063 to reduce the voltage. Use the -lax option to stop VDD-MAX verify, or change the resistors that set VCC-HI on the board.
All PIC's use the program counter during programming to address the memory. In all PIC's you have to ensure that the CPU can't start executing (incrementing the PC) before you enter program mode. Most datsheets say "less than 72 oscillator cycles"
In older PIC's or when using a crystal oscillator this is easy. On later devices which have internal RC oscillators this becomes a problem.
Several types let you change the Reset pin, MCLR, to being a general purpose input. When you do this you cannot force the part into reset anymore. This means you have to force the part into Program mode before it can start.
As of V1.16, PP06 has VPP trail VCC for all devices.
You can use the -TVPP= option to set the number of milliseconds between VCC and VPP. Negative numbers force VPP to lead VCC.
On sample 16F818's I have observed that parts will not enter program mode properly unless a small capcitor (I use 330pf, but 56pF seems sufficient) or a scope probe is put on the MCLR/VPP pin. Presumably this reduces the rate of rise. When working correctly the rise time is about 150ns.
When not working the device ID does not read correctly, or it fails to enter program mode at all.
I have now observed this problem on 16F818,819's. It also happens with 16F628A's when the programming socket is at the end of 150mm of ribbon cable.
I had thought that too-fast rise time was the problem. However with the 16F628A at the end of the ribbon cable, putting a 1nF capacitor at the programmer end of the cable does not fix the problem, and putting 56pF at the programming socket end does. So perhaps it is something coming out of the RST/VPP pin?
On 16F628's I have observed that RB3 must be low, or else VPP is unable to override it. This is a big pain for in-circuit reprogramming.
The LVP pin is RB4 on some devices (16F628) and RB3 on others (16F818)
Device ID is wrong in several datasheets. Also 16F818/9 use the lower 4 bits for revision, whereas earlier parts used the lower 5.
You need to carefully read the programming data for your part, paying very close attention to notes about clock cycles, and period between VCC and VHH etc. Also bear in mind that Microchip publish many incorrect programming data-sheets, and do not issue errata to programming information, they just silently change it in later copies.