Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] PIC18F2431 programming problem

Not open for further replies.


Junior Member level 1
Sep 9, 2010
Reaction score
Trophy points
Belgrade, Serbia
Activity points
Hi everybody!
I have a problem with my PIC18F2431 and easyPIC2 development board. Everything seems to work fine when I am programming it until at the very end this warning appears:

Programming FAILED!
-Program: 79 Error(s)
-ID(s) : 0 Error(s)

I have successfully programmed various types of PIC18s and PIC16s and never had this kind of problems. What could it be? Have perhaps anybody else this kind of problem too?

P.S. Program is just simple as it can be, switching diodes...


Well there are no errors in the compiler stage. Also during the programming stage (PICFlash Programmer) there are no errors and at the moment when the (Device status: Idle) should be staying (indicating that everything is OK) a above described warning just pop up in front of me. Some problem with communication?

I have searched through net to find people with similar problems and have found them. Some people have suggested that one should put jumper 9 to the ground and while programing the chip to hold button B4? Have you heard about that sir? I tried it but with no success... I checked other jumpers and everything is how it should be... I checked and chip is OK it is not damaged...

I am using PicFLASH [v7.03] if that is what you have asked me.

Actually, No.

However, your reply does answer my question. You're are using a MikroElektronika compiler, PicFLASH is MikroElektronika's programming utility, and v7.03 is definitely not a recent version.

Most likely your problem stems from the using an older version of a MikroElektronika compiler.

You need to upgrade your software:

**broken link removed**


The problem was, that I have to hold pin A5 (connected to Vcc) while programming the PIC. Thanks for your replies.

hello, PIC18F2431 doesn't have an "A5" (or RA5) pin, could you tell what pin number is it?, I'm having your problem :(

hello, PIC18F2431 doesn't have an "A5" (or RA5) pin, could you tell what pin number is it?, I'm having your problem :(

Correct. The PIC18F2431 does not have a RA5 pin, however the PIC18F4331/4431 which share a datasheet with the PIC18F2431 have a RA5 pin.

Reference: PIC18F2431 Datasheet, Section Pin Diagrams, pg. 4-7

Although, I suspect the OP maybe referring to the RB5 (PGM), instead of the RA5 pin.
The PGM line is used in Low Voltage Programming and can cause issues with In Circuit Serial Programming (ICSP) if not disabled.

To disable the PGM line use the appropriate configuration bit settings to disable the Low Voltage Programming (LVP) feature.

Reference: PIC18F2431 Datasheet, Section: 23.9 Single-Supply ICSP™ Programming, pg. 282

23.9 Single-Supply ICSP™ Programming

The LVP bit in Configuration Register 4L (CONFIG4L<2>) enables Single-Supply ICSP Programming. When
LVP is enabled, the microcontroller can be programmed without requiring high voltage being applied
to the MCLR/VPP pin, but the RB5/PGM pin is then dedicated to controlling Program mode entry and is
not available as a general purpose I/O pin.

LVP is enabled in erased devices.

While programming, using Single-Supply Program- ming, VDD is applied to the MCLR/VPP pin as in
normal execution mode. To enter Programming mode, VDD is applied to the PGM pin.

If Single-Supply ICSP Programming mode will not be used, the LVP bit can be cleared and RB5/PGM
becomes available as the digital I/O pin RB5. The LVP bit may be set or cleared only when using
standard high-voltage programming (VIHH applied to the MCLR/ VPP pin). Once LVP has been disabled,
only the standard high-voltage programming is available and must be used to program the device.

Memory that is not code-protected can be erased using either a block erase, or erased row by row,
then written at any specified VDD. If code-protected memory is to be erased, a block erase is
required. If a block erase is to be performed when using Single-Supply Programming, the device must
be supplied with VDD of 4.5V to 5.5V.


1: High-voltage programming is always
available, regardless of the state of the LVP bit or the PGM pin, by applying VIHH to the MCLR pin.

2: When Single-Supply Programming is enabled, the RB5 pin can no longer be used as a general
purpose I/O pin.

3: When LVP is enabled externally, pull the PGM pin to VSS to allow normal program execution.

There have been reports that indicate in some devices the PGM pin must be pull high (Vdd or Vcc) to disable LVP and effectively enable successful ICSP with some aftermarket ICSP programmers.

Hope the information helps,


No no, I tried the trick with RB5(PGM) pin but it wouldn't work. So RodStar if you programming your PIC on some developing board just press the RA5 taster, or button or how do you call it, and hold it as long as the process of programming last. With appropriate jumper your buttons should be connected to Vcc and not to the GND.

It worked for me, hopefully it will also for you.


Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to