PDA

View Full Version : PIC problem !!!



Rony
- 6th July 2011, 18:46
Hi all,

I wrote a program using PBP250C for the 16F877A
i am using the ICSP to program the PIC, everything is working properly, i can write and read the PIC, but sometimes when trying to read the program via the ICSP, after reading it, the PIC stops running and i should reprogram it again, as if it becomes erased !!!
i don't know what's happening, the hardware is correct, it is not the first time that i am using the ICSP, i can share the PCB if it is necessary.

Anyone can help ???
Thank you :D

cncmachineguy
- 6th July 2011, 18:58
Maybe it's a MCLR issue?

rsocor01
- 6th July 2011, 19:16
Rony,

There are many things that can cause that problem. If we can see the schematics it would help. There is some help here for the melabs programers,

http://melabs.com/support/icsp.htm

Rony
- 7th July 2011, 05:41
5747
This is the PCB capture, thanks

Rony
- 7th July 2011, 05:45
5748

With "DIP Switch"

Rony
- 7th July 2011, 05:48
PORTB is internally puled up,
i switched ON pin 4 in the DIP switch (RB3 to zero) and still having the same problem :(

Jumper
- 7th July 2011, 06:09
Hi,

I have never liked the 16F877A pic. When I used it I always had resets and other strange issues so I just changed to 18F452 or 18F4620 which are both pin-compatible with the 877A and not that much more expensive.

Just make sure the LVP (low voltage programming) is turned off in the config bits.

Sometimes I rather have a working product than really understanding why it doesnt work.

Acetronics2
- 7th July 2011, 16:23
Hi,

With the BIG caps on your board something Hurts me :




14.5 Power-on Reset (POR)
A Power-on Reset pulse is generated on-chip when

V

DD rise is detected (in the range of 1.2V-1.7V). To take

advantage of the POR, tie the MCLR pin to V


DD

through an RC network, as described in


Section 14.4

“MCLR”


. A maximum rise time for VDD is specified.

See


Section 17.0 “Electrical Characteristics” for

details.
When the device starts normal operation (exits the
Reset condition), device operating parameters (voltage,
frequency, temperature, etc.) must be met to
ensure operation. If these conditions are not met, the
device must be held in Reset until the operating conditions
are met.



looks there's a missing cap in your design ... don't you think ???

On my side, I use MC34064P5 supervisor to get rid of power on or reset rise times ... and have NO issues with reset pin ...

BTW ... a hardware reset after reading the Prog memory is not to forget ...

Alain