Link to home
Start Free TrialLog in
Avatar of simsingh
simsingh

asked on

Pic 16F728A question

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
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

>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.
 
Avatar of simsingh
simsingh

ASKER

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

have you tried to draw less current to the LED by increasing resistor value?
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
ASKER CERTIFIED SOLUTION
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
PIC16F728A? I was just on Microchip's web site and did not find this uC. Anyway, did you select HS for oscillator?