Searching \ for '[PIC]: RC Oscillator on a 16f84' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/time.htm?key=oscillator
Search entire site for: 'RC Oscillator on a 16f84'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: RC Oscillator on a 16f84'
2001\08\16@023027 by jeethur

flavicon
face
Hi,

All these days, I've been using PICs with Crystal Oscillators.
But now, I've got an application which needs a cheap and dirty
RC Oscillator. The 16f84 data sheet only says:

<QUOTE>
Recommended values: 5 kW # Rext # 100 kW
Cext > 20pF
</QUOTE>

I tried a resistor of 15K and a Cap of 0.1 mfd.
But it does not work.

Could someone advise me on how to get this working
and how to calculate the frequency for a given value of
R and C ?

Thanks in Advance,

Jeethu Rao

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\16@090522 by Jinx

face picon face
> I tried a resistor of 15K and a Cap of 0.1 mfd.
> But it does not work.

100nF is waaaaaaaay too much

> Could someone advise me on how to get this working
> and how to calculate the frequency for a given value of
> R and C ?

http://home.clear.net.nz/pages/joecolquitt/0f84rc.html

I made this graph using 4 x 16F84A's from different batches
and taking the average

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\16@135435 by John Ferrell

flavicon
face
Don't forget that the RC oscillator must be defined in the programming
operation!

John Ferrell
6241 Phillippi Rd
Julian NC 27283
Phone: (336)685-9606
Dixie Competition Products
NSRCA 479 AMA 4190  W8CCW
"My Competition is Not My Enemy"



{Original Message removed}

2001\08\16@183557 by Brent Brown

picon face
> I tried a resistor of 15K and a Cap of 0.1 mfd.
> But it does not work.
>
> Could someone advise me on how to get this working
> and how to calculate the frequency for a given value of
> R and C ?

I have 390k and 82pF on a PIC16F84A which runs nicely at 25kHz
with a 5V supply.

Usually for this kind of thing I use R x C to give a first
approximation to the period, then use the trial and error method
from here on. In my example above, 1/(RC) = 31.3kHz

Brent Brown
Electronic Design Solutions
16 English Street
Hamilton, New Zealand
Ph/fax: +64 7 849 0069
Mobile/text: 025 334 069
eMail:  spam_OUTbrent.brownTakeThisOuTspamclear.net.nz

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\16@194911 by Ned Seith

flavicon
face
Jeethu,

I use 4,700 ohms and 22pF with the 16F84 to produce 4 MHz. with the
oscillator type set to "RC".

These not-recommended by Microchip values work reliably, reduce cost (vs
crystal) and reduce weight for model airplane receivers.

Of course precise synchronization is not expected with the RC oscillator.

Sincerely,
Ned Seith
Nedtronics
59 3rd Street
Gilroy, CA 95020
(408) 842-0858
.....nedKILLspamspam@spam@nedtron.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\16@205025 by Jinx

face picon face
From: Brent Brown <brent.brownspamKILLspamclear.net.nz>
>
> I have 390k and 82pF on a PIC16F84A which runs nicely
> at 25kHz with a 5V supply

Fits with the graph

220k + 100p = 35kHz
470k + 100p = 17kHz

390k +100p would be around 20kHz, 390k + 82p 24kHz

The RC circuit is not the most stable part of the PIC but it
should be repeatable. It varies with temperature and, even
with a trimmer, it wouldn't pay to use the PIC under those
circumstances for any long-string comms that require
precise timing. It should be OK for apps where periodic
synching can be done though

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\16@214420 by Brent Brown

picon face
> The RC circuit is not the most stable part of the PIC but it
> should be repeatable. It varies with temperature and, even
> with a trimmer, it wouldn't pay to use the PIC under those
> circumstances for any long-string comms that require
> precise timing. It should be OK for apps where periodic
> synching can be done though

Yeah thats what I reckon too. I gave up on 32kHz crystals on a
recent project because I had trouble getting the right capacitors to
make them start and then two of them failed in service. No doubt
there would be a way to overcome these problems, but the RC
option suddenly came to mind as cheap and reliable, and accuracy
didn't matter. In this case with RC oscillator at 25kHz the circuit
uses about 10uA more than with xtal at 32kHz.

Brent Brown
Electronic Design Solutions
16 English Street
Hamilton, New Zealand
Ph/fax: +64 7 849 0069
Mobile/text: 025 334 069
eMail:  .....brent.brownKILLspamspam.....clear.net.nz

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\16@223420 by Jeff DeMaagd

flavicon
face
----- Original Message -----
From: Ned Seith <EraseMEnedspam_OUTspamTakeThisOuTNEDTRON.COM>

> I use 4,700 ohms and 22pF with the 16F84 to produce 4 MHz. with the
> oscillator type set to "RC".
>
> These not-recommended by Microchip values work reliably, reduce cost (vs
> crystal) and reduce weight for model airplane receivers.

Although they recommend R >= 5k Ohms, if you read the accompanying comments
in the data sheet, they say that with R <= 4k the oscillator may become
unstable, so 4.7k seems safe enough.

Jeff

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\08\17@005426 by Ned Seith

flavicon
face
Jeff,

I am fully aware of the Microchip specifications as indicated by my comment
"not-recommended by Microchip" within my post. Rather than speculating on
what might be safe, you should try it and see it for yourself. These
oscillator values have performed "reliably" for the majority of I/O
functions including serial RS232. The less favorable characteristics of an
RC oscillator at 32KHz are not present at 4MHz and there has not been a
single incident of a stalling oscillator amongst 1,200 PCBs during
exhaustive "burn in" testing.

Sincerely,
Ned Seith
Nedtronics
59 3rd Street
Gilroy, CA 95020
(408) 842-0858
nedspamspam_OUTnedtron.com

At 10:26 PM 8/16/01 -0400, you wrote:
>{Original Message removed}

2001\08\17@011606 by Jinx

face picon face
> I am fully aware of the Microchip specifications as
> indicated by my comment "not-recommended by
> Microchip" within my post. Rather than speculating on

Referring back to

http://home.clear.net.nz/pages/joecolquitt/0f84rc.html

you'll see that the frequency was measured up to 5.84MHz
(using 2k2 +22p). At this point the waveform has become
distorted and personally I wouldn't trust it. I can't say if the
limits suggested by Microchip are to guarantee the survival
of the F84A's RC internal circuitry or the perfomance of the
software. The F628 is specced to go to 8MHz with RC (which
you could probably exceed) if you need faster s/w, whilst the
original F84 on paper tops out at 4.7MHz

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@013801 by Bala Chandar

flavicon
face
Hi Jeethu,

You may consider using the 16F628 which has an internal 4MHz oscillator.
This is ideal for applications that do not require a highly accurate
clock.

The additional benefit is that the parts count gets reduced!

Regards,
Bala

> {Original Message removed}

2001\08\17@055608 by Ned Seith

flavicon
face
Jinx,

As my current timing routines are geared to 4MHz, it was my objective to
use the RC oscillator at 4MHz.
The RC oscillator wave form at 4MHz is a clean square wave with rounded
upper corners.
The amplitude, turn on and turn off times of the wave form are more than
acceptable.
I did insert 10 tick (clock pulse) time delays after I/O functions to
assure reliability.

Sincerely,
Ned Seith
Nedtronics
59 3rd Street
Gilroy, CA 95020
(408) 842-0858
@spam@nedKILLspamspamnedtron.com

At 05:16 PM 8/17/01 +1200, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@061516 by Jinx

face picon face
> As my current timing routines are geared to 4MHz, it was my
> objective to use the RC oscillator at 4MHz. The RC oscillator
> wave form at 4MHz is a clean square wave with rounded upper
> corners. The amplitude, turn on and turn off times of the wave

4MHz isn't really pushing it for an F84A. 6MHz would be I think.
Main thing is that you've got something cheap, predictable,
repeatable etc etc

I mentioned the comparison between F84/F84A and F628 to
illustrate how the RC high end is being extended with each
new release. I'm sure 4MHz RC on an F84A / F628 would more
than likely be superior to that of the older F84. I'm still waiting
for a 17C44 to upgrade my PSP so I can use F628s. AFAIK
Microchip has still not quantitised the single R mode for the
F628 and that was going to be one of my first little jobs. As you
know this thread started because there was apparently no (I
have to say easily produced) graph from Microchip for selecting
RC values for the F84A

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@072142 by Ned Seith

flavicon
face
Jinx,

I have found that good quality decade resistance substitution boxes
and decade capacitance substitution boxes in conjunction with a good
scope will resolve most RC circuit concerns very quickly. Actual operational
parameters and actual -dB cutoff points can be determined in spite of
the manufacturer's specifications.

Sincerely,
Ned Seith
Nedtronics
59 3rd Street
Gilroy, CA 95020
(408) 842-0858
KILLspamnedKILLspamspamnedtron.com





At 10:14 PM 8/17/01 +1200, you wrote:
{Quote hidden}

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@080128 by Jinx

face picon face
> I have found that good quality decade resistance substitution
> boxes and decade capacitance substitution boxes in
> conjunction with a good scope will resolve most RC circuit
> concerns very quickly.

Granted, but not everyone has access to those. Looking
through data books of other micros I use, RC seems to be
quite a neglected feature. Only the book for the Motorola
68HH705K1 (which I used a lot before the F84) goes into
RC in any detail, including an RC v freq graph. No other
Mot I'm aware of has RC. The Zilog Z8 books merely say
that RC or even LC can be used, AVRs I'm familiar with
don't have either RC or internal oscs (except for WDT). I
wonder how many people actually even consider RC as
an option and needlessly spend money on crystals or
resonators. If they were more aware of RC and had an
accurate way (on paper) of determining values perhaps
RC would be first choice. I have to admit I myself tend to
reach for the crystal box rather easily

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@085529 by jeethur

flavicon
face
Thanks for all your replies guys,

I've got it working.
I used a 33 pf cap and a 4.7K resistor.
I noticed that if the value of the cap is increased,
the OSC frequency decreases.
I even managed to run without a cap. May be the residual capacitance
of the PCB was acting.

Jeethu Rao

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@090359 by Jinx

face picon face
> Thanks for all your replies guys,
>
> I've got it working.

No problem, glad you can move on

> I used a 33 pf cap and a 4.7K resistor.
> I noticed that if the value of the cap is increased,
> the OSC frequency decreases.

And if you increase R also

> I even managed to run without a cap. May be the residual
> capacitance of the PCB was acting.

There will be some stray capacitance but I wouldn't rely
on it being either constant because of humidity, temperature,
closeness of other devices etc or the same as another board.
You will be best to put a known C in and then you don't have
to worry about it

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\17@094538 by Russell McMahon

picon face
> I wonder how many people actually even consider RC as
> an option and needlessly spend money on crystals or
> resonators. If they were more aware of RC and had an
> accurate way (on paper) of determining values perhaps
> RC would be first choice. I have to admit I myself tend to
> reach for the crystal box rather easily

In hobbyist projects the cost of a crystal (around $NZ1 = $US0.50 or so) is
probably not a major factor.
The main reason to use RC is probably to get low power consumption due to
low clock rate or in volume production where every cent counts and clock
stability and accuracy are not critical.

I have used RC in one only PIC application (a small keyfob sized disability
aid with a production volume of only a handful of units so far).
I wanted a lower clock rate to get lower power but not as low as 32 KHz, and
getting crystals below 1 MHz is problematical and expensive.
I ran RC at about 200 to 400 KHz.
The clock frequency varies not only with temperature but also with supply
voltage. The PIC is run on an unregulated 3 cell NiMH battery until such
stage as it refuses to run so clock frequency variation is marked..
I'm not using the LP part but tests indicate that the standard 16F84 parts
work well in this application including EEROM writing and reading).

I also wanted very very low power in shutdown mode and was surprised to find
that the shut down current was approx Vcc/2/Rosc.
A search of the data sheet confirmed that this should have been expected.
This is a VERY undesirable feature.
I solved it in this application by returning the top of the Oscillator
resistor to the reset line rather than to Vcc.
When the reset pin is low the oscillator draws no power.

The PIC current in reset is still unacceptably high compared to some other
available processors, even with everything possible shut down - it's
measured in microamps so I ended up using a power turn off circuit using a
high side transistor which is operated on user key press and then held on by
the PIC as long as desired. Supply current in off mode is << 0.1 uA.


regards


           Russell McMahon

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\08\18@031050 by Roman Black

flavicon
face
Jinx wrote:
{Quote hidden}

Obviously not great for timing sensitive stuff,
but I like the RC oscillator. It has a reliability
that you won't get with a vibrating crystal or
resonator. It doesn't rely on mech vibration,
won't wear out like a crystal or resonator, wont
glitch or fail on physical shocks, usually smaller
and cheaper, etc etc. Not every project needs
a perfect accuracy clock. :o)
-Roman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body


2001\08\18@033210 by Roman Black

flavicon
face
Jinx wrote:
>
> > I tried a resistor of 15K and a Cap of 0.1 mfd.
> > But it does not work.
>
> 100nF is waaaaaaaay too much

Not really, this should oscillate fine. I have
run the PIC in RC mode down to a few Hz clock
frequency.
-Roman

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email spamBeGonelistservspamBeGonespammitvma.mit.edu with SET PICList DIGEST in the body


2001\08\18@071520 by Jinx

face picon face
> > > I tried a resistor of 15K and a Cap of 0.1 mfd.
> > > But it does not work.
> >
> > 100nF is waaaaaaaay too much
>
> Not really, this should oscillate fine. I have
> run the PIC in RC mode down to a few Hz clock
> frequency.

Perhaps you're right. 100nF just looked so out of the ordinary.
Extrapolating from the graph would indicate 600-700Hz. In
which case you'd have to ask Jeethu to define "does not
work", although that's academic now as he says it's running

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email TakeThisOuTlistservEraseMEspamspam_OUTmitvma.mit.edu with SET PICList DIGEST in the body


More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...