PDA

View Full Version : "Program Memory Error" with MPLAB IDE (PBP)



aggie007
- 13th November 2007, 00:18
Hi,

I am trying to program PIC 18F4525 using PBP in Micro Code Studio, which compiles the code successfully. When I use MPLAB IDE v7.50 to program the PIC, once or twice it works fine, but from then on it gives me a "FAILED" message and displays the following result -

Device Type: PIC18F4525
Address Range 0-1ff


Program Memory Errors

Address Good Bad

0000: 6A00 0000
0002: EFC9 0000
0004: F000 0000
0006: 50E9 0000
0008: 6E08 0000
000A: 9281 0000
000C: 9081 0000
000E: 9081 0000
0010: 9293 0000
0012: 9093 0000
0014: 9093 0000
0016: 0E0F 0000
0018: 1693 0000
001A: 5008 0000
001C: B200 0000
001E: D022 0000
0020: 0E3A 0000
0022: 6E02 0000
0024: 0E98 0000
0026: EC95 0000
0028: F000 0000
002A: 0E33 0000
002C: 6E07 0000
002E: D82F 0000
0030: 0E13 0000
0032: 6E02 0000
0034: 0E88 0000
0036: EC95 0000
0038: F000 0000
003A: D829 0000
003C: 0E64 0000
003E: EC94 0000
Any additional errors are not displayed.


Configuration Memory Errors

Field : Oscillator
Expected: INT RC-Port on RA6,Port on RA7
Received: LP

Field : Fail Safe Clock Monitor
Expected: Enabled
Received: Disabled

Field : Internal External Switch Over
Expected: Enabled
Received: Disabled

Field : Watchdog Timer
Expected: Enabled
Received: Disabled-Controlled by SWDTEN bit

Field : Watchdog Postscaler
Expected: 1:512
Received: 1:1

Field : Power Up Timer
Expected: Disabled
Received: Enabled

Field : Brown Out Detect
Expected: Enabled in hardware, SBOREN disabled
Received: Disabled in hardware, SBOREN disabled

Field : Brown Out Voltage
Expected: 2.0V
Received: 4.5V

Field : Master Clear Enable
Expected: MCLR Enabled,RE3 Disabled
Received: MCLR Disabled, RE3 Enabled

Field : CCP2 Mux
Expected: RC1
Received: RB3

Field : Stack Overflow Reset
Expected: Enabled
Received: Disabled

Field : Code Protect Boot
Expected: Disabled
Received: Enabled

Code Protect 0800-3FFF Disabled Enabled
Code Protect 4000-7FFF Disabled Enabled
Code Protect 8000-BFFF Disabled Enabled
Field : Data EE Read Protect
Expected: Disabled
Received: Enabled

Field : Table Write Protect Boot
Expected: Disabled
Received: Enabled

Table Write Protect 0800-3FFF Disabled Enabled
Table Write Protect 4000-7FFF Disabled Enabled
Table Write Protect 8000-BFFF Disabled Enabled
Field : Data EE Write Protect
Expected: Disabled
Received: Enabled

Field : Config. Write Protect
Expected: Disabled
Received: Enabled

Field : Table Read Protect Boot
Expected: Disabled
Received: Enabled

Table Read Protect 0800-3FFF Disabled Enabled
Table Read Protect 4000-7FFF Disabled Enabled
Table Read Protect 8000-BFFF Disabled Enabled




PLEASE HELP !!!

aggie007
- 13th November 2007, 00:26
I tried using different PICs, but still the problem persists. I tried switching to a different computer, it worked fine for the first couple of times and then again the problem appeared. I tried testing different codes with no luck.

Please Help !!!

mackrackit
- 13th November 2007, 15:58
Hi,

I had a similar problem with 18F4320. Using a PICSTART PLUS and MPLAB.

I bought the latest update chip for the PICSTART and that did not help. Then I contacted MICRO CHIP and was told to add a capacitor between VDD and VSS . Helped a little.

The way I got it to work is to have the 18F4320 powered up during the programming process. Using the PICSTART as an ICSP, MCLR internal, and the "ground" from the programmer connected to the pic power supply "ground".

I am not using MCLR for IO, have it set for internal to make things simple. The two programming pins are not used for IO either, again to keep things simple.

If you want to use these pins and do ICSP there are ways around it but that is another subject.

mister_e
- 13th November 2007, 17:44
Which programmer are you using?

ICSP or in the ZIFF socket?

If ICSP, did you loaded the PGM pin to gnd?

HenrikOlsson
- 13th November 2007, 19:27
Hi,
I had a simmilar problem with the 18F2431. With help from other forum contributors this was found in the PICStart help-file:


PICSTART Plus Limitations for PIC18F2331/2431
All power supply (Vdd and AVdd) and ground (Vss and AVss) pins must be used in order for these devices to program. PICSTART Plus will handle Vdd, Vss and AVss properly, but you must place a 1kOhm resistor between Pin 7 (AVdd) and Pin 11 in the socket with the device for proper operation. There are other devices that may require the use of all power supply and ground pins. Consult the datasheet if an unexplained programming problem occurs, such as inconsistent programming.

May be something to look into.

/Henrik Olsson.