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.

[SOLVED] Microchip PIC Timing Issues (Crystal Related)

Status
Not open for further replies.

areebqaisar

Newbie level 2
Joined
Jun 12, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,299
Hello All.

I was working on a Project, where I had to do some RS-232 Communication between a PC and a PIC16F877A.
But before going for the RS232, Currently I am Stuck on the Timing issue.

I am using PIC16F877A, and I've tried 12MHz and 20MHz External Crystal with 30pF Capacitors, and programmed the Controller for a Blinking LED Code.
Well, I am pretty much sure that There is nothing wrong with the Code, and its working in Proteus.

But on a Real Hardware, the Blinking rate is way too slow.
I have set a Delay of 1s in my Code. but the actual delay is something like 6 seconds.

Moreover, I have set the Clock Option to "XT"
As per the datasheet, we need to set the clock option to "HS" when using a Crystal above 4MHz, but when I set it to "HS",
the controller does't work at all !.... It just powers up with all the LEDs ON and than nothing happens.

However, with XT, the LEDs do blink but the blinking rate is too slow....

Can anyone please help me out ?
 

hi;
Where do you install your HW on a PCB or breadboard? If you are using a breadboard 30pf may be too high (or somehow on your PCB similiar case).
Just remove load caps and set configuration to "HS".
Try like this.
 

Thanks for your Reply Emresel...
The Problem is Solved now...
By the way, the hardware is on a Hand Etched PCB...

The problem was with the BOREN Bit...
I've playing with the configuration Bits for last some hours but couldn't solve the problem.
But its done now ....

Here's the Configuration Bit Setting that Worked:
Code: 2F0A
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top