Solved

Pic 16F728A question

Posted on 2004-08-06
6
535 Views
Last Modified: 2013-12-09
Hello,

we have a Pic 16F728A which we are trying to get working wtih a 16 or 20 MHZ crystal. We use a 5v power supply, brown out reset is off, watchdog timer disabled. With the crystals, we attach 22pf capacitros between crystal and ground, as stated in the manual. The problem is that the pic is unstable when we turn it on! all we are trying to do is turn on an led and keep it on...however the led flashes randomly...we have tried using higher level capacitors (up to 68pf) but it keeps happening.....we have read somewhere that we may have to include a resistor between crystal and pin..is this reccomended? would this fix the problem? why is this problem happening?

thanks
0
Comment
Question by:simsingh
  • 3
  • 2
6 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
>all we are trying to do is turn on an led and keep it on
I will assume this: You have a little program that turns high  an output line in PIC to turn on a LED, but LED flashes.
So, in appearance your problem is not related to crystal frequency (unless you have tried with lower speed and works well).
If you can make led blink regularly, then your PIC is working well, even if some flashing problems, maybe you are drawing to much current from PIC output, try to use a higher resistor to handle LED, or a transistor if you need more current anyway.
 
0
 

Author Comment

by:simsingh
Comment Utility
but it does work with lower mhz crystals...anywhere from 4-8mhz it works, above that it breaks down....any ideas?

0
 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
have you tried to draw less current to the LED by increasing resistor value?
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:simsingh
Comment Utility
No we haven't....can that be the issue? willl higher rate crystals cause more current to be drawn and so create problems with teh led's?

Sim
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
Comment Utility
>No we haven't....can that be the issue? willl higher rate crystals cause more current to be drawn and so create problems
> with teh led's?
Yes, more speed will draw more current (from power source to microcontroller), but I can't ensure how can this affect output ports, just try.
Also you can try with a bigger voltage  regulator.
0
 

Expert Comment

by:rsinisa
Comment Utility
PIC16F728A? I was just on Microchip's web site and did not find this uC. Anyway, did you select HS for oscillator?
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Introduction: When experiencing some peculiar problem with the functioning of your PC, how many times has it happened that you look for a solution and even google can’t help? It could be that you are one of the only few people on earth who ma…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now