Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

pic 16f877 program memory corrupted

Status
Not open for further replies.

roy mathew

Junior Member level 2
Joined
Feb 19, 2004
Messages
21
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
137
16f877 program memory

Hi all
My pic 16f877 works for some times and after that it does not function. When I tried verifying prom it shows error. Once erased and re programmed problem solves temporarily. My project use adc and there is a lcd interface in it ADC inputs are driven from Lm 324 op amp LM324 is powered by a 9v single end supply out put voltage is limited to 5.5v using zener. I use a serial programmer to load program. Could some body help me in this regard?
 

pic program memory

this information i heard it from some technicals

in pic16f877 as the program size go bigger as the number of errors of the programed pic increase
 

I have encounered this once, when I programmed the PIC and specified the programmer to use low voltage programming.
What that does is RB3 is always an input, used to program the part in the circuit. since RB3 was left open in my circuit, it probably picked up noise and eventually the program memory got corrupted, though it worked for a while.

Check that you are not programming it using the low voltage programming option.
 

    roy mathew

    Points: 2
    Helpful Answer Positive Rating
I think is because of some poor decoupling of the power suply and bypas capacitors too far from the PIC.
Once I had a problem in a frequency meter: when the chip was programmed, it worked perfectly, but after a while, especially when a transient situation apeared (like repeatedly switching power on and off) the program memory got corrupted - it looked like it was erased.
Placing some bypas capacitors solved it.
 

Hi
sorry for being away for long time problem solved when Rb3 pin grounded with a 3.2k resistor and asigned it as an out put. But i could not understand the rason properly. Thank you very much vvv.


thanks
 

Well, you programmed the PIc with the option of LVP (Low Voltage Programming) enabled. That turned RB3 into an input. Since it was just floating, the part entered programming mode by itself and erased itself (at least partially). You should not enable LVP if you are not going to use it.
Look at my post in this link

Take a look at this attachment, too. See page 183 of the datasheet for more info.
 

Look out for 2 things :

1. Disable LVP
2. Use 0.1uF cermaic decoupling capacitor, or a small LC filter
 

Hi
in pic16f877 as the program size go bigger as the number of errors of the programed pic increase
\

Are u sure about this info.
I had never faced or haeared about before

Thanks
Haytham
 

use +5v exactly for pic supply 78ls05 3 pin to92 case or similar
or a lower dropout type
5.3 then its out of range of normal operation and it will be unstable

voltage to a pic cant be more than 5.3 or as pointed out programing voltage plays a role in how flash eeprom errors occur

to over write data rom is hard eeprom maybe but it can be done in some code

also keep serial cables short as possible and away from monitors and mains cables
 

HI, Thanks a lot for inputs provided by avery body.

VSMVDD mentioned here about power suplly voltage.
Iam using 78lso5 itself, is there any problem if supply drops below 5v down to 4.6v. What about all this instability talk does that means pic is not suitable to use ina rugged industrial environment.
 

I have try supply voltage 4.2V, on 16F84a
Still working quite ok.
PIC micrcontroller are stable to me, and have used it for years.
However there are many little unusual configuration here and there
which a programmer need to take note.
It is easy to missed on some points in the 100 over pages of PIC16F877 document.
Through experience, you will be able to avoid some pit-holes.


www.siongboon.com
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top