Datasheet

PIC12F510/16F506
DS41268D-page 60 © 2007 Microchip Technology Inc.
Although the oscillator will operate with no external
capacitor (C
EXT = 0 pF), we recommend using values
above 20 pF for noise and stability reasons. With no
capacitance or small external capacitance, the oscilla-
tion frequency can vary dramatically due to changes in
external capacitances, such as PCB trace capacitance
or package lead frame capacitance.
Section 13.0 “Electrical Characteristics, shows RC
frequency variation from part-to-part due to normal
process variation. The variation is larger for larger val-
ues of R (since leakage current variation will affect RC
frequency more for large R) and for smaller values of C
(since variation of input capacitance will affect RC
frequency more).
Also, see the Electrical Specifications section for
variation of oscillator frequency due to V
DD for given
R
EXT/CEXT values, as well as frequency variation due
to operating temperature for given R, C and V
DD
values.
FIGURE 10-5: EXTERNAL RC
OSCILLATOR MODE
10.2.5 INTERNAL 4/8 MHz RC
OSCILLATOR
The internal RC oscillator provides a fixed 4/8 MHz
(nominal) system clock (see Section 13.0 “Electrical
Characteristics for information on variation over
voltage and temperature).
In addition, a calibration instruction is programmed into
the last address of memory, which contains the calibra-
tion value for the internal RC oscillator. This location is
always uncode protected, regardless of the code-pro-
tect settings. This value is programmed as a MOVLW XX
instruction where XX is the calibration value, and is
placed at the Reset vector. This will load the W register
with the calibration value upon Reset and the PC will
then roll over to the users program at address 0x000.
The user then has the option of writing the value to the
OSCCAL Register (05h) or ignoring it.
OSCCAL, when written to with the calibration value, will
“trim” the internal oscillator to remove process variation
from the oscillator frequency.
For the PIC12F510/16F506 devices, only bits <7:1> of
OSCCAL are used for calibration. See Register 4-5 for
more information.
VDD
REXT
CEXT
VSS
OSC1
Internal
clock
N
FOSC/4
OSC2/CLKOUT
PIC12F510
PIC16F506
Note: Erasing the device will also erase the pre-
programmed internal calibration value for
the internal oscillator. The calibration
value must be read prior to erasing the
part so it can be reprogrammed correctly
later.
Note: The 0 bit of OSCCAL is unimplemented
and should be written as ‘0’ when modify-
ing OSCCAL for compatibility with future
devices.