I do recall I answered this very question only the other day (6 August 2002) - well it seems like only the other day... Search MeLabs archives "ER Oscillator on 16F628"...

Don't forget about that archive... it's pretty usefull... anyhow, the salient part I've replicated below...

--- snip ---

Simple to test though.... I just threw a few Resistors at a standard circuit, checked CLKOUT on RA6 (which is fosc/4) and measured...

Resistor = RA6osc. Vdd was 5v. PIC was 16F628-04

10K=1.83MHz
27K=1.07MHz
33K=875kHz
68K=470kHz
100K=344kHz
270K=144kHz
330K=120kHz
680K=62kHz
1M=42kHz

Remember RA6 is fosc/4. So it looks like 27k gives you 4MHz clock (a value which is below the recommended 38K).

Lowering Vdd causes an increase in fosc. Vdd of 4.0v had a +3.5% fosc with 10K, dropping to +1.1% fosc at 1M.

Also the clock pulse width with Resistors above 220K starts to become unequal. With a 1M Resistor for example, the Clock High (17.7uS) was almost three times that of the Low (5.9us).

--- snip ---

Actually, as you can see from the above Resistor table, the 10K Resistor was clocking at over 7MHz... so... get yourself a 50K pot and wind it down (slowly!) until the PIC falls over... then just throttle it back a fraction until the PIC just starts up and you have the optimum setting for your turbo budget pacemaker...

Melanie