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.

PIC16F877A Trigging problem...

Status
Not open for further replies.

salman.

Member level 1
Joined
Jul 30, 2012
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,591
Hi All, I am facing a problem in a project that i am building using PIC16F877A, the problem is that my PIC uC won't start its operation until I press the reset button twice or thrice...
My circuit simulates perfectly in proteus but it is not showing the desired output on the vero board.. I have double checked all the connections and they are all good....Need help!

Thanking you in anticipation. PIC.jpg
 

Hi Salman, two question for you:
1. your using voltage in this case is?
2. the resistor value on MCLR\ pin is?
regards
 

Answers,
1. I am using regulated 5V
2. The resistor is 1kohm
 

What is the crystal oscillator frequency?
Give me the configuration word detail...
Is it LVP enabled?
Oscillator mode?
 

Hi All, I am facing a problem in a project that i am building using PIC16F877A, the problem is that my PIC uC won't start its operation until I press the reset button twice or thrice...
My circuit simulates perfectly in proteus but it is not showing the desired output on the vero board.. I have double checked all the connections and they are all good....Need help!

Thanking you in anticipation.View attachment 82747


Just use a 0.1uF ceramic capacitor (A decoupling capacitor) very close to PIC. (between +5V and GND)
 

8MHz external oscillator, what is LVP enabled?...want to know

- - - Updated - - -

here are the proteus and Hex files
 

Attachments

  • prj files.rar
    15.2 KB · Views: 75

Change the MCLR pullup resistor to 10k.

Use 0.1uF capacitors across both VDD and VSS lines. Ensure you've connected both VDD and VSS lines properly.

You may also want to add a capacitor from MCLR pin to ground if the problem persists. Use a capacitor with capacitance between 0.01uF and 0.1uF.

Hope this helps.
Tahmid.
 
Thanks tahmid, I am already using a 0.1uF across Vdd and Vss pins on both sides of the controller...I have also tried using a 10k pull-up resistor but to no avail :(

- - - Updated - - -

I am using the 0.1uF across Vdd and Vss on the hardware not in the proteus
 

Just try this and post your results:
Before powering up the circuit, connect MCLR to ground (hold the button down). After 5 seconds, remove the ground connection. See if the PIC is operating properly or if you need to further reset it.

Also, try this:
Instead of connecting the pull-up resistor from MCLR directly to VDD, use a diode in the path. Then, use a 0.01uF capacitor from MCLR to ground, and a 0.01uF capacitor from after the diode to ground.
 

Change the MCLR pullup resistor to 10k.

Use 0.1uF capacitors across both VDD and VSS lines. Ensure you've connected both VDD and VSS lines properly.

You may also want to add a capacitor from MCLR pin to ground if the problem persists. Use a capacitor with capacitance between 0.01uF and 0.1uF.

Hope this helps.
Tahmid.

Hello Tahmid,
I don't think so that connecting a capacitor across Vcc a Vdd might have any effect on MCLR ['reset'] pin. Connecting a capacitor across Vss and Vdd only provide exact 5 volts to MCU (Microcontroller) without nay noise or spikes.
 

Hello Tahmid,
I don't think so that connecting a capacitor across Vcc a Vdd might have any effect on MCLR ['reset'] pin. Connecting a capacitor across Vss and Vdd only provide exact 5 volts to MCU (Microcontroller) without nay noise or spikes.

MCLR is pulled up to VDD. Spikes on VDD, thus, may affect MCLR.
 

That's true for supplied voltage to MCU i.e means to say If controller receives voltage with ripples or spikes then it will show unexpected output but shows some output definitely. But In salman's case, output is not displaying.....
So,
For exact output a Capacitor ['ceramic'] should be added between Vcc and Vss.
 

one of the short comings of faked chips lies in the operating speed claimed by the original vendor...so i advice u go down to a lower clock "crystal value". i hav had bad times in terms of crystal value with the PIC16F877A MCU from microchip runing at such crystal value and above and to be sure my code is ok i back tested with F84A and 873A pics and voila! it worked.... also try grounding the cystals body with a wire i beliv this shud help........sequel
 

one of the short comings of faked chips lies in the operating speed claimed by the original vendor...so i advice u go down to a lower clock "crystal value". i hav had bad times in terms of crystal value with the PIC16F877A MCU from microchip runing at such crystal value and above and to be sure my code is ok i back tested with F84A and 873A pics and voila! it worked.... also try grounding the cystals body with a wire i beliv this shud help........sequel

Thanks Sequel for your kind reply: -

Using a lower value crystal means that I have to use crystal lower than 8 mHz???? Because we are currently using 8 MhZ.
 

thanks Tahmid, I did that too but to no avail, I have to push the reset thrice to get it started.

- - - Updated - - -

1.png
2.png
3.png
4.png
5.png

Thanks Sequel, yes as imtisal said we are using a 8MHz crystal...should we use a 4MHz? Also I have another question in mind for you too imtisal..could it be our programmer? for those of you who don't know what programmer we are using...we are using the Genius 540 programmer...could it be the programmer that's faulty?...it's brand new though.

the programmer displays an error message too before programming but programs the uC.. I am attaching the error message it displays
 

Hi All, the triggering problem is solved by using a different compiler version ... i.e using MikroC V.8.1
 

With the previous compiler you were using, create a new project and try again. Since it works with another version, your hardware and code are fine. So, fault lies in the compiler. While I have occasionally faced such issues, creating a new project, copy-pasting the code and trying again usually solves it.
 
sure i'll try that too..I like the latest mikroC not the Version 8.1
 

The odd part is that, I faced these problems with the old mikroC v8.2. I had thought they fixed the problem in the new mikroC versions. I only had this problem on the new mikroC once or maybe twice.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top