I read in ( 18Fxx2 DataSheet )>>> http://ww1.microchip.com/downloads/en/DeviceDoc/39564c.pdfthat I can use a Resistor and a Capacitor to clock the 18f452 PIC Page 18 says (including a diagram) : Recommended values:3 k=A6=B8 =A1=DC REXT =A1=DC 100, CEXT > 20pF But there is not place I can find the achieved clocking related to those values. Any clue ? Sebastian.
18F452 RC oscillator mode
Started by ●April 1, 2008
Reply by ●April 1, 20082008-04-01
"SebastiaNot" <sebastiasebas@gmail.com> wrote in message news:1d4f26ed-095a-4091-b552-d1519df1457e@d21g2000prf.googlegroups.com...> > I read in ( 18Fxx2 DataSheet ) > >>> http://ww1.microchip.com/downloads/en/DeviceDoc/39564c.pdf > > that I can use a Resistor and a Capacitor to clock the 18f452 PIC > > Page 18 says (including a diagram) : > > Recommended values:3 k�� �� REXT �� 100, CEXT > 20pF > > But there is not place I can find the achieved clocking related to > those values. > > Any clue ? Sebastian.Well the text says that there are many factors that affect the frequency so you won't get a tight tolerance for a start. This is a simple RC charge and discharge circuit, the switching levels will be in the data sheet for logic highs and lows so you should be able to calculate under nominal conditions the charge and discharge times. Add these two together and there's your period of oscillation. That's where I'd start followed quickly with a practical test to see how many 10's of % i'm away from what I calculated! I'm sure there's a Microchip App Note for this, they're usually pretty good on these sort of things. What frequency and what tolerance do you need? Dave.
Reply by ●April 2, 20082008-04-02
Dave : you say ??? Add these two together and there's your period of oscillation ??? How can you add Ohms to Farads ? What units is the result ? I need a "normal" frequency, lets say 1 or 5 or 10 MHz ... Thanks. Seb.
Reply by ●April 2, 20082008-04-02
"SebastiaNot" <sebastiasebas@gmail.com> wrote in message news:a354520c-4cc1-46be-aba7-5b33247faf30@r9g2000prd.googlegroups.com...> > Dave : you say > > ??? Add these two together and there's your period of > oscillation ??? > > How can you add Ohms to Farads ? > What units is the result ? >No Seb, please re-read what I wrote and also quote what you are referring to so that the discussion is easier to follow as I am doing here. I wrote: ...so you should be able to calculate under nominal conditions the charge and discharge times. Add these two together and there's your period of oscillation. So I am saying add together the charge and discharge times to get the period, units are seconds.> I need a "normal" frequency, lets say 1 or 5 or 10 MHz ...There's no such thing as a normal frequency, you choose the value required by your application. If your frequencies are in the MHz then using the RC is probably not the way to go. Use a crystal. You still haven't said what tolerance you need.> Thanks. Seb.
Reply by ●April 2, 20082008-04-02
In article <a354520c-4cc1-46be-aba7-5b33247faf30 @r9g2000prd.googlegroups.com>, sebastiasebas@gmail.com says...> > Dave : you say > > ??? Add these two together and there's your period of > oscillation ??? > > How can you add Ohms to Farads ? > What units is the result ? > > I need a "normal" frequency, lets say 1 or 5 or 10 MHz ... > > Thanks. Seb. >I think the point is that your frequency will not be "normal" it will vary, from part to part, by temperature, and by variations of Vdd. Anyway, if you look at Figure 23-12 on page 294 of the documentation, there is a graph that shows frequency VS Vdd and 'R' value. Jim
Reply by ●April 2, 20082008-04-02
On 2 Abr, 14:18, "Dave" <D...@dave.com> wrote:> "SebastiaNot" <sebastiase...@gmail.com> wrote in message > > news:a354520c-4cc1-46be-aba7-5b33247faf30@r9g2000prd.googlegroups.com... > > > > > Dave : you say > > > ??? Add these two together and there's your period of > > oscillation ??? > > > How can you add Ohms to Farads ? > > What units is the result ? > > No Seb, please re-read what I wrote and also quote what you are referring to > so that the discussion is easier to follow as I am doing here. > > I wrote: > > ...so you should be able to calculate under nominal conditions the charge > and discharge times. Add > these two together and there's your period of oscillation. > > So I am saying add together the charge and discharge times to get the > period, units are seconds. > > > I need a "normal" frequency, lets say 1 or 5 or 10 MHz ... > > There's no such thing as a normal frequency, you choose the value required > by your application. If your frequencies are in the MHz then using the RC > is probably not the way to go. Use a crystal. > > You still haven't said what tolerance you need. > > > Thanks. Seb.Thanks, Dave, for your patience. My application is quite simple : I want to measure a solar cell voltage let's say 1 time every second. I want my PIC to run "easy", and dont like the frequency to change with temperature and power supply, so I guess I shall use a crystal.
Reply by ●April 2, 20082008-04-02
On 2 Abr, 15:38, James Beck <j...@reallykillersystems.com> wrote:> In article <a354520c-4cc1-46be-aba7-5b33247faf30 > @r9g2000prd.googlegroups.com>, sebastiase...@gmail.com says... > > > Dave : you say > > > ??? Add these two together and there's your period of > > oscillation ??? > > > How can you add Ohms to Farads ? > > What units is the result ? > > > I need a "normal" frequency, lets say 1 or 5 or 10 MHz ... > > > Thanks. Seb. > > I think the point is that your frequency will not be "normal" it will > vary, from part to part, by temperature, and by variations of Vdd. > Anyway, if you look at Figure 23-12 on page 294 of the documentation, > there is a graph that shows frequency VS Vdd and 'R' value. > > JimJIM : do you think it is normal a) to have the "RC oscilator" on page 18, and b) have the drawing on page 294 ?????????? Without any "pointer", no text, no formula ??? ok. Anyway, thanks a lot for the pointer to the page. if C = 20 pF and R = 3K3 then f = 3,5 MHz. Shall try it next weekend. Cheers ! Seb.
Reply by ●April 3, 20082008-04-03
In article <01150a41-edf3-4907-96b3- 770203fe6c4a@c19g2000prf.googlegroups.com>, sebastiasebas@gmail.com says...> On 2 Abr, 15:38, James Beck <j...@reallykillersystems.com> wrote: > > In article <a354520c-4cc1-46be-aba7-5b33247faf30 > > @r9g2000prd.googlegroups.com>, sebastiase...@gmail.com says... > > > > > Dave : you say > > > > > ??? Add these two together and there's your period of > > > oscillation ??? > > > > > How can you add Ohms to Farads ? > > > What units is the result ? > > > > > I need a "normal" frequency, lets say 1 or 5 or 10 MHz ... > > > > > Thanks. Seb. > > > > I think the point is that your frequency will not be "normal" it will > > vary, from part to part, by temperature, and by variations of Vdd. > > Anyway, if you look at Figure 23-12 on page 294 of the documentation, > > there is a graph that shows frequency VS Vdd and 'R' value. > > > > Jim > > JIM : do you think it is normal > a) to have the "RC oscilator" on page 18, > and > b) have the drawing on page 294Well, it is for Microchip. :) The table of contents lists "23.0 DC and AC Characteristics Graphs and Tables". Seemed like a logical place to look, but some type of reference on the appropriate page(s) would be nice.> > ?????????? > > Without any "pointer", no text, no formula ??? ok.Yep, see above.> > Anyway, thanks a lot for the pointer to the page. > if C = 20 pF and R = 3K3 then f = 3,5 MHz.Yeah, maybe, sort of, on most/some parts. I think a cheap ceramic resonator would be cheap insurance. Jim