difficulty making external rc osc work

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

difficulty making external rc osc work

Peter P.
Using 16f57 for ultra low cost, I can't get the external rc oscillator to work
at all. I can inject clock and CLK2 outputs CLK1/4, but connecting a pullup
between 2k2 and 10k to CLK1 simply pulls it high and nothing interesting ever
happens. There is no table for RC selection in the datasheet of the 16f57. I
could find nothing relevant in the microchip.com search engine. Can someone
please point me to a table or other data set which clarifies the rc component
limits for modern 16f57s? And other pics?

My current option seems to be trial and error. C is 47pF ceramic for now. F
should be about 1MHz with 10k and 47pF, no? I mean, from plain RC circuit theory.

thanks,

  Peter

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: difficulty making external rc osc work

Spehro Pefhany
At 12:46 PM 20/08/2012, you wrote:

>Using 16f57 for ultra low cost, I can't get the external rc oscillator to work
>at all. I can inject clock and CLK2 outputs CLK1/4, but connecting a pullup
>between 2k2 and 10k to CLK1 simply pulls it high and nothing interesting ever
>happens. There is no table for RC selection in the datasheet of the 16f57. I
>could find nothing relevant in the microchip.com search engine. Can someone
>please point me to a table or other data set which clarifies the rc component
>limits for modern 16f57s? And other pics?
>
>My current option seems to be trial and error. C is 47pF ceramic for now. F
>should be about 1MHz with 10k and 47pF, no? I mean, from plain RC
>circuit theory.

Yes, about so. There are some graphs in the 16C57 that might help as a
rough guideline, but there are no guarantees that the F57 will be the
same (which is okay, since IIRC there are no min/max values anyhow).
There's also some general info in the midrange reference manual.

As to your difficulty, are you 100% sure that you have set the configuration
bits correctly for an RC oscillator?

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
[hidden email]             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com



--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: difficulty making external rc osc work

Peter P.
Spehro Pefhany <speff <at> interlog.com> writes:
> As to your difficulty, are you 100% sure that you have set the configuration
> bits correctly for an RC oscillator?

Yes, I am sure. Also, CLK2 outputs CLK1/4 when I clock CLK1 externally. It is
also pulled low when the watchdog fires after ~2sec. Thanks for the tips. I
assume either I somehow blew the pulldown mos on CLK1 or something else is wrong
with the chip, I will try another 2-3 to see.

According to the datasheet the chip cleared value should be this (RC osc, 11),
so any erased chip, including likely any new one, should come up in RC mode even
without programming it at all.

I will use an XT osc to make the code work (already simulated) and return to RC
later. One thing at a time.

-- Peter

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
ivp
Reply | Threaded
Open this post in threaded view
|

Re: difficulty making external rc osc work

ivp
> set the configuration bits correctly for an RC oscillator?
>
> Yes, I am sure

Hi Peter,

You have  _EXTRC_CLKOUT in your config ?

I use ExtRC on a few 16F projects and apart from drift I've
had no problems with it. The tables in the F88 datasheet are
a reasonable guide
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
ivp
Reply | Threaded
Open this post in threaded view
|

Re: difficulty making external rc osc work

ivp
In reply to this post by Peter P.
> C is 47pF ceramic for now. F should be about 1MHz with
> 10k and 47pF, no? I mean, from plain RC circuit theory

Sounds about right, if the ExtRC oscillator is anything like linear

My latest project has 5k6 + 22pF and Fosc is about 4100kHz

For your values -

4100 / ((10/5.6) * (47/22)) = 1074kHz Fosc or 269kHz Fop

Joe
--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist