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.

16f877a going crazy on breadboard

Status
Not open for further replies.

nicotyne

Newbie level 4
Joined
Oct 6, 2010
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,337
this problem had me going crazy for a weeks already..
i assemble my circuit on a breadboard,using 4Mhz(24pF),20Mhz(33pF) and each time i power on the circuit,the led wont blink.For the setting with 4Mhz oscillator,the led will blink very fast and for the setting with 20Mhz,i had to touch or wiggle the capacitor to make the circuit works but still,it blinks way too fast.
i had fabricate annother pcb for 16f877a before.The connection for both circuit are the same and the program works like wonder on the pcb so i know there's nothing wrong with my circuit design and program.

-the circuit that i use on the breadboard and on the pcb are the same
-the delay subroutine are tuned for the oscillator freq
-the circuit only gone crazy if i assemble it on breadboard
 

fast blink at 4MHz, might be due to too small delay loops. at 20MHz, better to try out with a pcb instead of breadboard, as inter-pin capacitance can trouble you.

Many people connect the crystal caps to the common ground bus for an indirect return thro Vss connection, and expect it to work. Please ensure that the common of capacitors is brought back to chip, very closely not from the power bus and back. Only for DC tests it looks good. Then place a 0.1uF capacitor across the Vdd and Vss pins.
ensure that both the Vdd pins are looped and likewise, both Vss pins.
 
Last edited:

i didnt think the problem are with my code because it works well on proteus and on the pcb.the problem only occurs when i use breadboard and i have 2 delay subroutine.one for 4Mhz and the other for 20Mhz both corresponds to a delay of 0.5 seconds.
fast here is like having 40Mhz clock supplied to my PIC when i only use 4Mhz oscillator..i will try to post the picture of the breadboard and my code later
 

Hi,

Think you have answered your own question if the circuit works on a pcb , proteus and not the breadboard.

Poor and dirty breadboard contacts and long interconnects can all give rise to such problems.

A well known one is that the signals from the xtal and its caps can get lost, soldering the xtal and 2 caps onto a separate piece of strip board and then using three thicker short wires to place the assembly as close to the pic as possible should cure the problem; also following mvs sarma good advice.
 

so i have no other choice than to separate the oscillator from the main circuit is it? i didnt expect crystal oscillator to be this sensitive..
 

both vdd and vss pins are connected to +5 supply and GND
 

i did mean that there are TWO Vdd pins(11 and 32) to be looped externally. TWO Vss pins (11 and 31) to be looped similarly.
 

did u enabled the brown out reset??? if not, enable it....
did u enable the LVP(Low voltage Programming) bit??? if yes, Disable it.....
did u connected the decoupling capacitor??? if no, connect that as near as possible
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top